assertEquals((double) 4.5, maxResult3.toDouble(), 0);
//test for destruction during merge
CalcResult maxResult4 = new MaxResult((Comparable) new Double(2));
CalcResult maxResult5 = (MaxResult) maxResult4.merge(maxResult1);
assertEquals(3, maxResult5.toDouble(), 0);
assertEquals(2, maxResult4.toDouble(), 0);
//test negative result
CalcResult maxResult6 = new MaxResult((Comparable) new Integer(-5));
CalcResult maxResult7 = (MaxResult) maxResult1.merge(maxResult6);
assertEquals(3, maxResult7.toDouble(), 0);
assertEquals(-5, maxResult6.toDouble(), 0);