### Question:
DurationUtils { static long getMilliSecondsPart(Duration d) { long u = d.toMillis() % 1000; return u; }  static Duration convertDurationFromDaprFormat(String valueString); static String convertDurationToDaprFormat(Duration value);  }### Answer:
@Test public void testGetMillisecondsPart() { Duration d1 = Duration.ZERO.plusMillis(61); Assert.assertEquals(61, DurationUtils.getMilliSecondsPart(d1)); Duration d2 = Duration.ZERO.plusMillis(60); Assert.assertEquals(60, DurationUtils.getMilliSecondsPart(d2)); Duration d3 = Duration.ZERO.plusMillis(59); Assert.assertEquals(59, DurationUtils.getMilliSecondsPart(d3)); Duration d4 = Duration.ZERO.plusMillis(999); Assert.assertEquals(999, DurationUtils.getMilliSecondsPart(d4)); Duration d5 = Duration.ZERO.plusMillis(1001); Assert.assertEquals(1, DurationUtils.getMilliSecondsPart(d5)); Duration d6 = Duration.ZERO.plusMillis(1000); Assert.assertEquals(0, DurationUtils.getMilliSecondsPart(d6)); Duration d7 = Duration.ZERO.plusMillis(10000); Assert.assertEquals(0, DurationUtils.getMilliSecondsPart(d7)); }