### Question:
FixedDistance { public FixedDistance(Distance fixedDistance) { this.fixedDistance = fixedDistance; } FixedDistance(Distance fixedDistance); Duration getDuration(Distance sourceDistance, Duration sourceDuration);  }### Answer:
@Test public void testFixedDistance() { DefaultDistance di = DefaultDistance.of(600, DistanceUnit.METERS); DefaultDuration du = DefaultDuration.of(3, TimeUnit.MINUTES); FixedDistance fixedDistance = new FixedDistance(DefaultDistance.of(800, DistanceUnit.METERS)); assertEquals(DefaultDuration.of(4, TimeUnit.MINUTES), fixedDistance.getDuration(di, du)); assertEquals(DefaultDuration.of(240, TimeUnit.SECONDS), fixedDistance.getDuration(di, du.convertTo(TimeUnit.SECONDS))); }