@Test @UseDataProvider("provideInvalidTime") public void invalidTime(final String invalidTime, final Class<Exception> expectedException) { this.thrown.expect(expectedException); Units.time(invalidTime); }
public static TimeUnit time(final String time) { checkNotNull(time); final TimeUnit unit = TIME_UNITS.get(time.toUpperCase()); checkArgument(unit != null, "Could not parse time [%s]", time); return unit; }
Units { public static TimeUnit time(final String time) { checkNotNull(time); final TimeUnit unit = TIME_UNITS.get(time.toUpperCase()); checkArgument(unit != null, "Could not parse time [%s]", time); return unit; } }
Units { public static TimeUnit time(final String time) { checkNotNull(time); final TimeUnit unit = TIME_UNITS.get(time.toUpperCase()); checkArgument(unit != null, "Could not parse time [%s]", time); return unit; } private  Units(); }
Units { public static TimeUnit time(final String time) { checkNotNull(time); final TimeUnit unit = TIME_UNITS.get(time.toUpperCase()); checkArgument(unit != null, "Could not parse time [%s]", time); return unit; } private  Units(); static TimeUnit time(final String time); static SizeUnit size(final String size); }
Units { public static TimeUnit time(final String time) { checkNotNull(time); final TimeUnit unit = TIME_UNITS.get(time.toUpperCase()); checkArgument(unit != null, "Could not parse time [%s]", time); return unit; } private  Units(); static TimeUnit time(final String time); static SizeUnit size(final String size);  }