### Question:
LeaseDuration { private LeaseDuration(long initial, long max, long step) { Preconditions.checkArgument(initial >= 0, "initial lease duration should be >=0"); Preconditions.checkArgument(max >= 0, "max lease duration should be >=0"); Preconditions.checkArgument(step >= 0, "step should be >=0"); this.initial = initial; this.max = max; this.step = step; } private  LeaseDuration(long initial, long max, long step); static Builder builder(); static LeaseDuration of(String initial, String max, String step); static LeaseDuration of(long initial, long max, long step); long getInitial(); long getMax(); long getStep(); long calcInitialLease(String requestedInitialLease); long calcInitialLease(long requestedInitialLease); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static final LeaseDuration FOREVER_LEASE_DURATION; }### Answer:
@Test public void testLeaseDuration() { LeaseDuration leaseDuration = LeaseDuration.of("7d", "0", "0"); Assert.assertEquals(604800000, leaseDuration.getInitial()); Assert.assertEquals(0, leaseDuration.getStep()); leaseDuration = LeaseDuration.of("3s", "0", "0"); Assert.assertEquals(3000, leaseDuration.getInitial()); leaseDuration = LeaseDuration.of("5m", "0", "0"); Assert.assertEquals(300000, leaseDuration.getInitial()); leaseDuration = LeaseDuration.of("10h", "0", "0"); Assert.assertEquals(36000000, leaseDuration.getInitial()); leaseDuration = LeaseDuration.of("0", "0", "0"); Assert.assertEquals(0, leaseDuration.getInitial()); }