And implements Predicate<Field<T>> { @Override public boolean resolve(final Field<T> field) { boolean result = true; for (final Predicate<Field<T>> predicate : this.opers) { if (!predicate.resolve(field)) { result = false; break; } } return result; } And(final Iterable<? extends Predicate<Field<T>>> operands);  And(final Predicate<Field<T>> first, final Predicate<Field<T>> second); @Override boolean resolve(final Field<T> field);  }
@Test public void resolvesToTrueWhenAllPredicatesTrue() { MatcherAssert.assertThat( new And<>( new True<>(), new True<>() ).resolve(new MkField<>(new Object(), new Object())), Matchers.is(true) ); }
@Test public void resolvesToFalseWhenOnePredicateFalse() { MatcherAssert.assertThat( new And<>( Arrays.asList(new True<>(), new True<>(), new False<>()) ).resolve(new MkField<>(new Object(), new Object())), Matchers.is(false) ); }