// Path: agera/src/main/java/com/google/android/agera/Conditions.java
// @NonNull
// public static Condition falseCondition() {
//   return FALSE_CONDICATE;
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Conditions.java
// @NonNull
// public static Condition trueCondition() {
//   return TRUE_CONDICATE;
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @SafeVarargs
// @NonNull
// @SuppressWarnings("unchecked")
// public static <T> Predicate<T> all(@NonNull final Predicate<? super T>... predicates) {
//   return composite(predicates, truePredicate(), falsePredicate(), false);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @SuppressWarnings("unchecked")
// @SafeVarargs
// @NonNull
// public static <T> Predicate<T> any(@NonNull final Predicate<? super T>... predicates) {
//   return composite(predicates, falsePredicate(), truePredicate(), true);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// public static <T> Predicate<T> conditionAsPredicate(@NonNull final Condition condition) {
//   if (condition == TRUE_CONDICATE) {
//     return truePredicate();
//   }
//   if (condition == FALSE_CONDICATE) {
//     return falsePredicate();
//   }
//   return new ConditionAsPredicate<>(condition);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// public static Predicate<CharSequence> emptyString() {
//   return EMPTY_STRING_PREDICATE;
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// public static <T> Predicate<T> equalTo(@NonNull final T object) {
//   return new EqualToPredicate<>(object);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static <T> Predicate<T> falsePredicate() {
//   return FALSE_CONDICATE;
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// public static <T> Predicate<T> instanceOf(@NonNull final Class<?> type) {
//   return new InstanceOfPredicate<>(type);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// public static <T> Predicate<T> not(@NonNull final Predicate<T> predicate) {
//   if (predicate instanceof NegatedPredicate) {
//     return ((NegatedPredicate<T>) predicate).predicate;
//   }
//   if (predicate == truePredicate()) {
//     return falsePredicate();
//   }
//   if (predicate == falsePredicate()) {
//     return truePredicate();
//   }
//   return new NegatedPredicate<>(predicate);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static <T> Predicate<T> truePredicate() {
//   return TRUE_CONDICATE;
// }
// 
// Path: agera/src/test/java/com/google/android/agera/test/matchers/HasPrivateConstructor.java
// @NonNull
// @Factory
// public static Matcher<Class<?>> hasPrivateConstructor() {
//   return INSTANCE;
// }


import static com.google.android.agera.Conditions.falseCondition;
import static com.google.android.agera.Conditions.trueCondition;
import static com.google.android.agera.Predicates.all;
import static com.google.android.agera.Predicates.any;
import static com.google.android.agera.Predicates.conditionAsPredicate;
import static com.google.android.agera.Predicates.emptyString;
import static com.google.android.agera.Predicates.equalTo;
import static com.google.android.agera.Predicates.falsePredicate;
import static com.google.android.agera.Predicates.instanceOf;
import static com.google.android.agera.Predicates.not;
import static com.google.android.agera.Predicates.truePredicate;
import static com.google.android.agera.test.matchers.HasPrivateConstructor.hasPrivateConstructor;
import static com.google.android.agera.test.matchers.PredicateApply.appliesFor;
import static com.google.android.agera.test.matchers.PredicateApply.doesNotApplyFor;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.sameInstance;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
  @Test
  public void shouldReturnFalseForAnyWithNoConditions() {
    assertThat(any(), doesNotApplyFor(new Object()));
  }

  @Test
  public void shouldReturnOriginalPredicateIfAnyOfOne() {
    assertThat(any(mockPredicateFalse), is(sameInstance(mockPredicateFalse)));
  }

  @Test
  public void shouldReturnTrueForAnyWithOneTrueCondition() {
    assertThat(any(truePredicate(), falsePredicate()), appliesFor(new Object()));
  }

  @Test
  public void shouldReturnFalseForAnyWithNoTrueCondition() {
    assertThat(any(falsePredicate(), falsePredicate()), doesNotApplyFor(new Object()));
  }

  @Test
  public void shouldReturnFalseForEqualToWhenNotEqual() {
    assertThat(equalTo(ITEM), doesNotApplyFor(OTHER_ITEM));
  }

  @Test
  public void shouldReturnTrueForEqualToWhenEqual() {
    assertThat(equalTo(ITEM), appliesFor(ITEM));
  }

// Path: agera/src/main/java/com/google/android/agera/Conditions.java
// @NonNull
// public static Condition falseCondition() {
//   return FALSE_CONDICATE;
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Conditions.java
// @NonNull
// public static Condition trueCondition() {
//   return TRUE_CONDICATE;
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @SafeVarargs
// @NonNull
// @SuppressWarnings("unchecked")
// public static <T> Predicate<T> all(@NonNull final Predicate<? super T>... predicates) {
//   return composite(predicates, truePredicate(), falsePredicate(), false);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @SuppressWarnings("unchecked")
// @SafeVarargs
// @NonNull
// public static <T> Predicate<T> any(@NonNull final Predicate<? super T>... predicates) {
//   return composite(predicates, falsePredicate(), truePredicate(), true);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// public static <T> Predicate<T> conditionAsPredicate(@NonNull final Condition condition) {
//   if (condition == TRUE_CONDICATE) {
//     return truePredicate();
//   }
//   if (condition == FALSE_CONDICATE) {
//     return falsePredicate();
//   }
//   return new ConditionAsPredicate<>(condition);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// public static Predicate<CharSequence> emptyString() {
//   return EMPTY_STRING_PREDICATE;
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// public static <T> Predicate<T> equalTo(@NonNull final T object) {
//   return new EqualToPredicate<>(object);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static <T> Predicate<T> falsePredicate() {
//   return FALSE_CONDICATE;
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// public static <T> Predicate<T> instanceOf(@NonNull final Class<?> type) {
//   return new InstanceOfPredicate<>(type);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// public static <T> Predicate<T> not(@NonNull final Predicate<T> predicate) {
//   if (predicate instanceof NegatedPredicate) {
//     return ((NegatedPredicate<T>) predicate).predicate;
//   }
//   if (predicate == truePredicate()) {
//     return falsePredicate();
//   }
//   if (predicate == falsePredicate()) {
//     return truePredicate();
//   }
//   return new NegatedPredicate<>(predicate);
// }
// 
// Path: agera/src/main/java/com/google/android/agera/Predicates.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static <T> Predicate<T> truePredicate() {
//   return TRUE_CONDICATE;
// }
// 
// Path: agera/src/test/java/com/google/android/agera/test/matchers/HasPrivateConstructor.java
// @NonNull
// @Factory
// public static Matcher<Class<?>> hasPrivateConstructor() {
//   return INSTANCE;
// }


// Path: agera/src/test/java/com/google/android/agera/PredicatesTest.java
import static com.google.android.agera.Conditions.falseCondition;
import static com.google.android.agera.Conditions.trueCondition;
import static com.google.android.agera.Predicates.all;
import static com.google.android.agera.Predicates.any;
import static com.google.android.agera.Predicates.conditionAsPredicate;
import static com.google.android.agera.Predicates.emptyString;
import static com.google.android.agera.Predicates.equalTo;
import static com.google.android.agera.Predicates.falsePredicate;
import static com.google.android.agera.Predicates.instanceOf;
import static com.google.android.agera.Predicates.not;
import static com.google.android.agera.Predicates.truePredicate;
import static com.google.android.agera.test.matchers.HasPrivateConstructor.hasPrivateConstructor;
import static com.google.android.agera.test.matchers.PredicateApply.appliesFor;
import static com.google.android.agera.test.matchers.PredicateApply.doesNotApplyFor;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.sameInstance;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;

  @Test
  public void shouldReturnFalseForAnyWithNoConditions() {
    assertThat(any(), doesNotApplyFor(new Object()));
  }

  @Test
  public void shouldReturnOriginalPredicateIfAnyOfOne() {
    assertThat(any(mockPredicateFalse), is(sameInstance(mockPredicateFalse)));
  }

  @Test
  public void shouldReturnTrueForAnyWithOneTrueCondition() {
    assertThat(any(truePredicate(), falsePredicate()), appliesFor(new Object()));
  }

  @Test
  public void shouldReturnFalseForAnyWithNoTrueCondition() {
    assertThat(any(falsePredicate(), falsePredicate()), doesNotApplyFor(new Object()));
  }

  @Test
  public void shouldReturnFalseForEqualToWhenNotEqual() {
    assertThat(equalTo(ITEM), doesNotApplyFor(OTHER_ITEM));
  }

  @Test
  public void shouldReturnTrueForEqualToWhenEqual() {
    assertThat(equalTo(ITEM), appliesFor(ITEM));
  }

  public void shouldReturnTrueForAnyWithNonStaticOneTrueCondition() {