@Test public void noThrow_strictMode_checkNotNull_failure_withMessage_shouldThrowNullPointerException() { NoThrow.setStrictMode(true); try { NoThrow.checkNotNull(null, "message"); fail("no exception thrown"); } catch (NullPointerException exception) { assertThat(exception.getMessage()).isEqualTo("message"); } }
public static void checkNotNull(Object reference) { checkNotNullInternal(reference, true, "Object can not be null.", EMPTY_ARGUMENTS); }
Preconditions { public static void checkNotNull(Object reference) { checkNotNullInternal(reference, true, "Object can not be null.", EMPTY_ARGUMENTS); } }
Preconditions { public static void checkNotNull(Object reference) { checkNotNullInternal(reference, true, "Object can not be null.", EMPTY_ARGUMENTS); } private  Preconditions(); }
Preconditions { public static void checkNotNull(Object reference) { checkNotNullInternal(reference, true, "Object can not be null.", EMPTY_ARGUMENTS); } private  Preconditions(); static void checkArgument(boolean expression); static void checkArgument(boolean expression, String errorMessage); static void checkArgument(boolean expression,
            String errorMessageTemplate, Object... errorMessageArgs); static void checkState(boolean expression); static void checkState(boolean expression, String errorMessage); static void checkState(boolean expression,
            String errorMessageTemplate, Object... errorMessageArgs); static void checkNotNull(Object reference); static void checkNotNull(Object reference, String errorMessage); static void checkNotNull(Object reference,
            String errorMessageTemplate, Object... errorMessageArgs); static void checkUiThread(); static void checkUiThread(String errorMessage); static void checkUiThread(String errorMessageTemplate, Object... errorMessageArgs); }
Preconditions { public static void checkNotNull(Object reference) { checkNotNullInternal(reference, true, "Object can not be null.", EMPTY_ARGUMENTS); } private  Preconditions(); static void checkArgument(boolean expression); static void checkArgument(boolean expression, String errorMessage); static void checkArgument(boolean expression,
            String errorMessageTemplate, Object... errorMessageArgs); static void checkState(boolean expression); static void checkState(boolean expression, String errorMessage); static void checkState(boolean expression,
            String errorMessageTemplate, Object... errorMessageArgs); static void checkNotNull(Object reference); static void checkNotNull(Object reference, String errorMessage); static void checkNotNull(Object reference,
            String errorMessageTemplate, Object... errorMessageArgs); static void checkUiThread(); static void checkUiThread(String errorMessage); static void checkUiThread(String errorMessageTemplate, Object... errorMessageArgs); static final String EMPTY_ARGUMENTS; }