Some JUnit trouble in eclipse

by

Got a cryptic "Ambiguous method" compilation error at the following line of code when using JUnit in eclipse. Here expectedChairPriceWithIncrease is a double while product.getPrice() returns a Double. The static imports were all there.

assertEquals(expectedChairPriceWithIncrease, product.getPrice());

With JUnit 4.3, the above line passed just fine, but ran into problems with JUnit4.4.

http://junit.sourceforge.net/doc/ReleaseNotes4.4.html calls it a fix for a bug.

"assertEquals now compares all Numbers using their native implementation of equals. This assertion, which passed in 4.3, will now fail:

assertEquals(new Integer(1), new Long(1));

Non-integer Numbers (Floats, Doubles, BigDecimals, etc), which were compared incorrectly in 4.3, are now fixed."