### Question:
NauticalMiles extends Length { public static double toKilometers(double nm) { return nm / Constants.UNIT_PER_KILO * 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 testToKilometers() { Assert.assertEquals(1., NauticalMiles.toKilometers(1000 / 1852.), 1e-14); }