Conditions { @NonNull public static Condition not(@NonNull final Condition condition) { if (condition instanceof NegatedCondition) { return ((NegatedCondition) condition).condition; } if (condition == TRUE_CONDICATE) { return FALSE_CONDICATE; } if (condition == FALSE_CONDICATE) { return TRUE_CONDICATE; } return new NegatedCondition(condition); } private  Conditions(); @NonNull static Condition trueCondition(); @NonNull static Condition falseCondition(); @NonNull static Condition staticCondition(final boolean value); @NonNull static Condition not(@NonNull final Condition condition); @NonNull static Condition any(@NonNull final Condition... conditions); @NonNull static Condition all(@NonNull final Condition... conditions); @NonNull static Condition predicateAsCondition(@NonNull final Predicate<T> predicate,
      @NonNull final Supplier<? extends T> supplier);  }
@Test public void shouldNegateNonStaticFalseCondition() { assertThat(not(mockConditionFalse), applies()); }
@Test public void shouldNegateNonStaticTrueCondition() { assertThat(not(mockConditionTrue), doesNotApply()); }
@Test public void shouldReturnOriginalConditionIfNegatedTwice() { assertThat(not(not(mockConditionFalse)), is(sameInstance(mockConditionFalse))); }