### Question:
PrintablePredicate implements Predicate<T> { @Override public PrintablePredicate<T> or(final Predicate<? super T> other) { return new PrintablePredicate<>(PrintablePredicateOperand.OR, this, other); } PrintablePredicate(final String name, final Predicate<T> predicate, final Object... values);  PrintablePredicate(final PrintablePredicateOperand operand, final Predicate<T> predicate, final Object... values);  PrintablePredicate(final PrintablePredicateOperand operand, final Predicate<? super T> left, final Predicate<? super T> right); @Override boolean test(final T t); @Override String toString(); @Override PrintablePredicate<T> or(final Predicate<? super T> other); @Override PrintablePredicate<T> and(final Predicate<? super T> other); @Override PrintablePredicate<T> negate();  }### Answer:
@Test public void testOr() { final Predicate<Asset> equityOrGovB = hasAssetClass("Equity").or(hasAssetType("Government Bond")).and(hasState("Active")); assertThat(equityOrGovB.toString()).isEqualToIgnoringCase("(AssetClass=Equity OR AssetType=Government Bond) AND State=Active"); assertThat(equityOrGovB.test(new Asset("Equity", "Stock", "Active"))).isTrue(); assertThat(equityOrGovB.test(new Asset("Bond", "Government Bond", "Active"))).isTrue(); assertThat(equityOrGovB.test(new Asset("Bond", "Government Bond", "Matured"))).isFalse(); assertThat(equityOrGovB.test(new Asset("Bond", "Corporate Bond", "Active"))).isFalse(); final Predicate<Asset> notEquityNorGovB = equityOrGovB.negate(); assertThat(notEquityNorGovB.toString()).isEqualToIgnoringCase("NOT ((AssetClass=Equity OR AssetType=Government Bond) AND State=Active)"); }