EqualsEvaluator extends Evaluator<T> { @Override protected TruthValue evaluate(T value) { if (value == null) { return TruthValue.NULL; } if (literal.compareTo(value) == 0) { return TruthValue.YES; } return TruthValue.NO; } EqualsEvaluator(String fieldName, Comparable<T> literal);   }
@Test public void stringIsEqual() { when(corc.getWritable(COL0)).thenReturn(FOO); assertThat(evaluator.evaluate(corc), is(TruthValue.YES)); }
@Test public void stringNotEqual() { when(corc.getWritable(COL0)).thenReturn(BAR); assertThat(evaluator.evaluate(corc), is(TruthValue.NO)); }
@Test public void stringNull() { when(corc.getWritable(COL0)).thenReturn(null); assertThat(evaluator.evaluate(corc), is(TruthValue.NULL)); }