@Test void shouldThrowForInvalidArgumentCheck() { String msg = "Argument check was unsuccessful"; InjectorException ex = assertThrows(InjectorException.class, () -> InjectorUtils.checkArgument(false, msg)); assertThat(ex.getMessage(), equalTo(msg)); }
public static void checkArgument(boolean expression, String errorMessage) { if (!expression) { throw new InjectorException(errorMessage); } }
InjectorUtils { public static void checkArgument(boolean expression, String errorMessage) { if (!expression) { throw new InjectorException(errorMessage); } } }
InjectorUtils { public static void checkArgument(boolean expression, String errorMessage) { if (!expression) { throw new InjectorException(errorMessage); } } private  InjectorUtils(); }
InjectorUtils { public static void checkArgument(boolean expression, String errorMessage) { if (!expression) { throw new InjectorException(errorMessage); } } private  InjectorUtils(); static void checkNotNull(Object o); static void checkNotNull(Object o, String errorMessage); @SafeVarargs static void checkNoNullValues(T... arr); static boolean containsNullValue(Object... arr); static void checkArgument(boolean expression, String errorMessage); static void rethrowException(Exception e); @Nullable static T firstNotNull(T obj1, T obj2); static boolean canInstantiate(Class<?> clazz); }
InjectorUtils { public static void checkArgument(boolean expression, String errorMessage) { if (!expression) { throw new InjectorException(errorMessage); } } private  InjectorUtils(); static void checkNotNull(Object o); static void checkNotNull(Object o, String errorMessage); @SafeVarargs static void checkNoNullValues(T... arr); static boolean containsNullValue(Object... arr); static void checkArgument(boolean expression, String errorMessage); static void rethrowException(Exception e); @Nullable static T firstNotNull(T obj1, T obj2); static boolean canInstantiate(Class<?> clazz);  }