Code example for TreeSet

Methods: isEmpty

	 * @tests java.util.TreeSet#isEmpty() 
	public void test_isEmpty() { 
		// Test for method boolean java.util.TreeSet.isEmpty() 
		assertTrue("Empty set returned false", new TreeSet().isEmpty());
		assertTrue("Non-Empty returned true", !ts.isEmpty());
	 * @tests java.util.TreeSet#iterator() 
	public void test_iterator() { 
		// Test for method java.util.Iterator java.util.TreeSet.iterator() 
		TreeSet s = new TreeSet();
		Iterator i = ts.iterator();
		Set as = new HashSet(Arrays.asList(objArray));
		while (i.hasNext())
		assertEquals("Returned incorrect iterator", 0, as.size());
Connect your IDE to all the code out there  Get Codota for Java