InEvaluator extends Evaluator<T> { @Override protected TruthValue evaluate(T value) { if (value == null) { return TruthValue.NULL; } for (Comparable<T> literal : literals) { if (literal.compareTo(value) == 0) { return TruthValue.YES; } } return TruthValue.NO; } InEvaluator(String fieldName, Iterable<Comparable<T>> literals);   }
@Test public void stringIsIn() { when(corc.getWritable(COL0)).thenReturn(FOO); assertThat(evaluator.evaluate(corc), is(TruthValue.YES)); }
@Test public void stringNotIn() { 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)); }