JsonValue { public Boolean requireBoolean() { return requireBoolean(identity()); } protected  JsonValue(Object obj); VoidMultiplexer canBe(Class<T> expectedType, Consumer<T> consumer); VoidMultiplexer canBeSchema(Consumer<JsonValue> consumer); Multiplexer<R> canBeMappedTo(Class<T> expectedType, Function<T, R> mapper); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); String requireString(); R requireString(Function<String, R> mapper); Boolean requireBoolean(); R requireBoolean(Function<Boolean, R> mapper); JsonObject requireObject(); R requireObject(Function<JsonObject, R> mapper); JsonArray requireArray(); R requireArray(Function<JsonArray, R> mapper); Number requireNumber(); R requireNumber(Function<Number, R> mapper); Integer requireInteger(); R requireInteger(Function<Integer, R> mapper);  }
@Test public void requireBooleanFailure() { exc.expect(SchemaException.class); exc.expectMessage("#: expected type: Boolean, found: String"); STR.requireBoolean(); }
@Test public void requireBooleanSuccess() { assertTrue(TRU.requireBoolean()); }
@Test public void requireBooleanWithMapper() { assertTrue(FLS.requireBoolean(bool -> !bool)); }