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