BooleanCondition extends BasicCondition<Boolean, BooleanCondition> implements BooleanChecks<BooleanCondition> { @NonNull @Override public BooleanCondition isTrue() { require(this.subject).isNotNull(); if (!this.subject) { DbcAssertionError.throwNew(new IllegalStateException("Expected subject to be true but was false"), this.message); } return this; } BooleanCondition(Boolean subject); @NonNull @Override BooleanCondition isTrue(); @NonNull @Override BooleanCondition isFalse();  }
@Test public void isTrue() throws Exception { BooleanCondition condition = new BooleanCondition(true); condition.isTrue(); assertThatThrownBy(condition::isFalse).isInstanceOf(DbcAssertionError.class) .hasCauseInstanceOf(IllegalStateException.class); }