Percentage extends Magnitude<Percentage> { @Override public boolean isEqualTo(final Percentage magnitude) { return (magnitude).value == value; } Percentage(final float value); Percentage add(final float value); Percentage add(final Percentage value); double doubleValue(); float floatValue(); int intValue(); @Override boolean isEqualTo(final Percentage magnitude); @Override boolean isLessThan(final Percentage magnitude); long longValue(); Percentage multiply(final float value); short shortValue(); Percentage subtract(final float value); Percentage subtract(final Percentage value); @Override boolean equals(final Object other); boolean equals(final Percentage other); @Override int hashCode(); @Override String toString();  }
@Test public void testIsEqualTo() { assertTrue(p1.isEqualTo(p2)); assertFalse(p1.isEqualTo(p3)); }