@Test public void checkStateWithValidCondition() { Throwable actual = thrownBy( () -> Assertion.checkState( true, MESSAGE_PATTERN, ARGUMENT_ONE, ARGUMENT_TWO ) ); assertThat( actual ).isNull(); }
public static void checkState( boolean condition, String messagePattern, Object ... arguments) { if( !condition ) { throw new IllegalStateException( formatErrorMessage( messagePattern, arguments ) ); } }
Assertion { public static void checkState( boolean condition, String messagePattern, Object ... arguments) { if( !condition ) { throw new IllegalStateException( formatErrorMessage( messagePattern, arguments ) ); } } }
Assertion { public static void checkState( boolean condition, String messagePattern, Object ... arguments) { if( !condition ) { throw new IllegalStateException( formatErrorMessage( messagePattern, arguments ) ); } }  }
Assertion { public static void checkState( boolean condition, String messagePattern, Object ... arguments) { if( !condition ) { throw new IllegalStateException( formatErrorMessage( messagePattern, arguments ) ); } }  static void checkArgument( boolean condition, String messagePattern, Object ... arguments ); static void checkState( boolean condition, String messagePattern, Object ... arguments); static String formatErrorMessage( String messagePattern, Object... arguments ); }
Assertion { public static void checkState( boolean condition, String messagePattern, Object ... arguments) { if( !condition ) { throw new IllegalStateException( formatErrorMessage( messagePattern, arguments ) ); } }  static void checkArgument( boolean condition, String messagePattern, Object ... arguments ); static void checkState( boolean condition, String messagePattern, Object ... arguments); static String formatErrorMessage( String messagePattern, Object... arguments );  }