@Test public void checkState_failure_withNullMessage_shouldThrowIllegalStateException() { try { Preconditions.checkState(false, null); fail("no exception thrown"); } catch (IllegalStateException exception) { assertThat(exception.getMessage()).isEqualTo("null"); } }
public static void checkState(boolean expression) { checkStateInternal(expression, true, "Illegal state.", EMPTY_ARGUMENTS); }
Preconditions { public static void checkState(boolean expression) { checkStateInternal(expression, true, "Illegal state.", EMPTY_ARGUMENTS); } }
Preconditions { public static void checkState(boolean expression) { checkStateInternal(expression, true, "Illegal state.", EMPTY_ARGUMENTS); } private  Preconditions(); }
Preconditions { public static void checkState(boolean expression) { checkStateInternal(expression, true, "Illegal state.", 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 checkState(boolean expression) { checkStateInternal(expression, true, "Illegal state.", 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; }