driver-core/src/main/com/mongodb/assertions/Assertions.java
public static void isTrue(final String name, final boolean condition, final SingleResultCallback<?> callback) {
        if (!condition) {
            IllegalStateException exception = new IllegalStateException("state should be: " + name);
            callback.onResult(null, exception);
            throw exception;
        }
    }
public static void isTrue(final String name, final boolean condition, final SingleResultCallback<?> callback) {
        if (!condition) {
            IllegalStateException exception = new IllegalStateException("state should be: " + name);
            callback.onResult(null, exception);
            throw exception;
        }
    }
public static void isTrue ( final String name , final boolean condition , final SingleResultCallback < ? > callback ) { if ( ! condition ) { IllegalStateException exception = new IllegalStateException ( "state should be: " + name ) ; callback . onResult ( null , exception ) ; throw exception ; } }
Throw IllegalStateException if the condition if false.

@param name      the name of the state that is being checked
@param condition the condition about the parameter to check
@param callback  the callback that also is passed the exception if the condition is not true
@throws java.lang.IllegalStateException if the condition is false
Throw IllegalStateException if the condition if false .