### Question:
Money extends Magnitude<Money> { public double doubleValue() { return amount / (double) centFactor(); } Money(final double amount, final String currency);  Money(final long amount, final String currency); Money add(final Money money); double doubleValue(); float floatValue(); BigDecimal getAmount(); String getCurrency(); boolean hasSameCurrency(final Money money); int intValue(); @Override boolean isEqualTo(final Money magnitude); boolean isGreaterThanZero(); @Override boolean isLessThan(final Money magnitude); boolean isLessThanZero(); boolean isZero(); long longValue(); Money subtract(final Money money); @Override boolean equals(final Object other); boolean equals(final Money other); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testDouble() { final Money m1 = new Money(100, "pds"); assertEquals(100.0, m1.doubleValue(), 0.0); }
@Test public void testDoubleConstructor() { final Money m1 = new Money(100.15, "pds"); assertEquals(100.15, m1.doubleValue(), 0.0); }
@Test public void testDoubleRoundingDown() { final Money m1 = new Money(100.154, "pds"); assertEquals(100.15, m1.doubleValue(), 0.0); }
@Test public void testDoubleRoundingUp() { final Money m1 = new Money(100.156, "pds"); assertEquals(100.16, m1.doubleValue(), 0.0); }