Code example for TreeSet

Methods: add, first, last

0
		assertEquals(20120405135316L, mFailed.getId()); 
	} 
 
	@Test 
	public void testCompareToInOrder() { 
		SortedSet<IBuild> treeSet = new TreeSet<IBuild>(); 
		treeSet.add(mGood); 
		treeSet.add(mFailed); 
		 
		assertEquals(mGood,treeSet.first()); 
		assertEquals(mFailed,treeSet.last()); 
 
	} 
 
	@Test 
	public void testCompareToOutOffOrder() { 
		SortedSet<IBuild> treeSet = new TreeSet<IBuild>(); 
		treeSet.add(mFailed);  
		treeSet.add(mGood); 
		 
		assertEquals(mGood,treeSet.first());