### Question:
LengthUnitsProvider extends AbstractUnitsProvider<Length> { @Override public <T extends Length> T convert(Class<T> desiredType, Length source) throws InvalidUnitsException { return Length.create(desiredType, source); } LengthUnitsProvider(); @Override T convert(Class<T> desiredType, Length source); @Override T fromUnitsAndMagnitude(Class<T> type, Number magnitude); @Override Class<? extends Length> getDisplayClass(Length value); @Override String getLongLabel(Class<? extends Length> type, boolean plural); @Override String getSelectionLabel(Class<? extends Length> type); @Override String getShortLabel(Class<? extends Length> type, boolean plural); @Override Class<Length> getSuperType(); @Override String toShortLabelString(Length obj);  }### Answer:
@Test public void testConvert() { NauticalMiles oneNauticalMile = new NauticalMiles(1.); Assert.assertSame(oneNauticalMile, new LengthUnitsProvider().convert(NauticalMiles.class, oneNauticalMile)); Assert.assertEquals(oneNauticalMile, new LengthUnitsProvider().convert(NauticalMiles.class, new Meters(1852.))); }