DifferentialExpression implements Expression { public boolean isRegulatedLike(Regulation regulation) { return Regulation.UP_DOWN.equals(regulation) || isLikeUpRegulation(regulation) || isLikeDownRegulation(regulation); } DifferentialExpression(double pValue, double foldChange); double getPValue(); double getFoldChange(); boolean isRegulatedLike(Regulation regulation); @Override boolean equals(Object object); @Override int hashCode(); @Override double getLevel(); boolean isOverExpressed(); boolean isUnderExpressed(); double getAbsoluteFoldChange(); @Override JsonObject toJson(); @Override String toString();  }
@Test public void testUnderExpressedGeneIsForRegulation() { DifferentialExpression expression = new DifferentialExpression(1.0, -1.0); assertThat(expression.isRegulatedLike(Regulation.UP_DOWN), is(true)); assertThat(expression.isRegulatedLike(Regulation.UP), is(false)); assertThat(expression.isRegulatedLike(Regulation.DOWN), is(true)); }
@Test public void testOverExpressedGeneIsForRegulation() { DifferentialExpression expression = new DifferentialExpression(1.0, 1.0); assertThat(expression.isRegulatedLike(Regulation.UP_DOWN), is(true)); assertThat(expression.isRegulatedLike(Regulation.UP), is(true)); assertThat(expression.isRegulatedLike(Regulation.DOWN), is(false)); }