@Test @UseDataProvider("provideTime") public void time(final List<String> units, final TimeUnit unit) { for (final String u : units) { assertThat(Units.time(u), is(unit)); } }
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);  }