### Question:
PrintablePredicate implements Predicate<T> { @Override public PrintablePredicate<T> and(final Predicate<? super T> other) { return new PrintablePredicate<>(PrintablePredicateOperand.AND, 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 testAnd() { final Predicate<Asset> activeBondOrEquity = hasAssetClass("Equity", "Bond").and(hasState("Active")); assertThat(activeBondOrEquity.toString()).isEqualToIgnoringCase("AssetClass in (Equity, Bond) AND State=Active"); assertThat(activeBondOrEquity.test(new Asset("Equity", "Stock", "Active"))).isTrue(); assertThat(activeBondOrEquity.test(new Asset("Bond", "Corporate Bond", "Active"))).isTrue(); assertThat(activeBondOrEquity.test(new Asset("Bond", "Government Bond", "Matured"))).isFalse(); final Predicate<Asset> notActiveBondOrEquity = activeBondOrEquity.negate(); assertThat(notActiveBondOrEquity.toString()).isEqualToIgnoringCase("NOT (AssetClass in (Equity, Bond) AND State=Active)"); }