### Question:
Kilometers extends Length { @Override public double inMeters() { return toMeters(getMagnitude()); } Kilometers(double kilometers);  Kilometers(Length dist); static double fromMeters(double meters); static double toMeters(double kilometers); @Override Kilometers clone(); @Override String getLongLabel(boolean plural); @Override String getShortLabel(boolean plural); @Override double inMeters(); static final String KILOMETERS_LONG_LABEL; static final String KILOMETERS_SHORT_LABEL; static final Kilometers ONE; static final Kilometers ZERO; }### Answer:
@Test public void testUnits() { Length dist = new Kilometers(1.852); 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.); }