### Question:
NauticalMiles extends Length { public static double fromKilometers(double km) { return km / METERS_PER_NAUTICAL_MILE * Constants.UNIT_PER_KILO; } 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 testFromKilometers() { Assert.assertEquals(1000., NauticalMiles.fromKilometers(1852.), 0.); }