### Question:
DurationUnitsProvider extends AbstractUnitsProvider<Duration> { @Override public <T extends Duration> T convert(Class<T> desiredType, Duration from) throws InvalidUnitsException { return Duration.create(desiredType, from); } DurationUnitsProvider(); @SuppressWarnings("PMD.PreserveStackTrace") void add(Calendar cal, Duration dur); @Override T convert(Class<T> desiredType, Duration from); @Override T fromUnitsAndMagnitude(Class<T> type, Number magnitude); @Override Class<? extends Duration> getDisplayClass(Duration value); Duration getLargestIntegerUnitType(Duration input); @Override String getLongLabel(Class<? extends Duration> type, boolean plural); @Override String getSelectionLabel(Class<? extends Duration> type); @Override String getShortLabel(Class<? extends Duration> type, boolean plural); @Override Class<Duration> getSuperType(); @Override String toShortLabelString(Duration obj);  }### Answer:
@Test public void testConvert() { Seconds oneHourInSeconds = new Seconds(3600L); Assert.assertSame(oneHourInSeconds, new DurationUnitsProvider().convert(Seconds.class, oneHourInSeconds)); Assert.assertEquals(oneHourInSeconds, new DurationUnitsProvider().convert(Seconds.class, new Hours(1L))); }