### Question:
NauticalMiles extends Length { @Override public double inMeters() { return getMagnitude() * METERS_PER_NAUTICAL_MILE; } NauticalMiles(double nm);  NauticalMiles(Length dist); static double fromKilometers(double km); static double fromMeters(double meters); static double toKilometers(double nm); static double toMeters(double nm); @Override NauticalMiles clone(); @Override String getLongLabel(boolean plural); @Override String getShortLabel(boolean plural); @Override double inMeters(); static final int METERS_PER_NAUTICAL_MILE; static final String NM_LONG_LABEL; static final String NM_SHORT_LABEL; }### Answer:
@Test public void testUnits() { Length dist = new NauticalMiles(1.); Assert.assertEquals(6076.1154855643044619422572178515, dist.inFeet(), 0.); Assert.assertEquals(1852., dist.inMeters(), 0.); Assert.assertEquals(6076.1154855643044619422572178515, new Feet(dist).getMagnitude(), 0.); Assert.assertEquals(72913.385826771653543307086614219, new Inches(dist).getMagnitude(), 0.); Assert.assertEquals(1., new NauticalMiles(dist).getMagnitude(), 0.); Assert.assertEquals(1852., new Meters(dist).getMagnitude(), 0.); Assert.assertEquals(1.852, new Kilometers(dist).getMagnitude(), 0.); Assert.assertEquals(1.1507794480235425117314881094416, new StatuteMiles(dist).getMagnitude(), 0.); Assert.assertEquals(2025.3718285214348206474190726172, new Yards(dist).getMagnitude(), 0.); }