@Test public void convertFromSecondsToMilliseconds() { TimeWithUnit twu = new TimeWithUnit(TimeUnit.SECONDS, 123); long duration = twu.getTime(TimeUnit.MILLISECONDS.name()); assertThat(duration, is(123000L)); }
public long getTime() { return time; }
TimeWithUnit { public long getTime() { return time; } }
TimeWithUnit { public long getTime() { return time; } private  TimeWithUnit();  TimeWithUnit(TimeUnit unit, long time); }
TimeWithUnit { public long getTime() { return time; } private  TimeWithUnit();  TimeWithUnit(TimeUnit unit, long time); String getTimeUnit(); long getTime(); long getTime(String unit); long getTime(TimeUnit unit); }
TimeWithUnit { public long getTime() { return time; } private  TimeWithUnit();  TimeWithUnit(TimeUnit unit, long time); String getTimeUnit(); long getTime(); long getTime(String unit); long getTime(TimeUnit unit);  }