AclStrategyComposer implements AclComposer<AclStrategy> { public AclStrategy and(AclStrategy lhs, AclStrategy rhs) { return new CompoundAclStrategy(lhs, rhs, StrategyOperator.AND); } AclStrategyComposer(AclStrategyComposerProvider composerProvider); AclStrategy and(AclStrategy lhs, AclStrategy rhs); AclStrategy or(AclStrategy lhs, AclStrategy rhs);  }
@Test public void test_and_strategy() { AclStrategy aAndB = aclStrategyComposer.and(containsA, containsB); Function<String, Boolean> stringTester = aAndB.handlerFor(stringTesterFeature); assertThat(stringTester.apply("A")).isFalse(); assertThat(stringTester.apply("B")).isFalse(); assertThat(stringTester.apply("C")).isFalse(); assertThat(stringTester.apply("AB")).isTrue(); assertThat(stringTester.apply("ABC")).isTrue(); assertThat(stringTester.apply("AC")).isFalse(); assertThat(stringTester.apply("BC")).isFalse(); }