RawCriterion extends AbstractCriterion { @Override public String value() { return filter; } RawCriterion(String filter); @Override String value();  }
@Test public void testCriterion() throws Exception { RawCriterion criterion = new RawCriterion("(a=b)"); assertThat(criterion.value(), equalTo("(a=b)")); assertThat(criterion.filter(), notNullValue()); }
@Test(expected = CriterionException.class) public void testCriterionInvalid() throws Exception { RawCriterion criterion = new RawCriterion("(a=b"); assertThat(criterion.value(), equalTo("(a=b")); criterion.filter(); }