assertEquals(3, uniqueResult1.toSet().size());
//test a merge with duplicate elements
Set anotherSet = new HashSet();
anotherSet.add(new Integer(2));
anotherSet.add(new Integer(4));
CalcResult uniqueResult4 = new UniqueResult(anotherSet);
CalcResult uniqueResult5 = uniqueResult1.merge(uniqueResult4); //1,2,3 + 2,4
assertEquals(4, uniqueResult5.toSet().size());
//mock optimization
uniqueVisitor.setValue(anotherSet);
uniqueResult1 = uniqueVisitor.getResult();