IsDifferentialExpressionAboveCutOff implements Predicate<X> { @Override public boolean test(X differentialExpression) { if (Regulation.UP == regulation) { return isOverExpressed(differentialExpression); } if (Regulation.DOWN == regulation) { return isUnderExpressed(differentialExpression); } return isUnderExpressed(differentialExpression) || isOverExpressed(differentialExpression); }  @Override boolean test(X differentialExpression); IsDifferentialExpressionAboveCutOff<X> setPValueCutoff(double pValueCutOff); IsDifferentialExpressionAboveCutOff<X> setFoldChangeCutOff(double foldChangeCutOff); IsDifferentialExpressionAboveCutOff<X> setRegulation(Regulation regulation);  }
@Test public void testApply() { assertThat(subject.test(EXPRESSION_1), is(true)); assertThat(subject.test(EXPRESSION_2), is(true)); }