AlwaysQueryExpression extends BaseQueryExpression { @Override public boolean evaluate(VertexWrapper vWrapper) { return ! negate; } protected  AlwaysQueryExpression(); @Override Pipe asPipe(); @Override boolean evaluate(VertexWrapper vWrapper); @Override boolean evaluate(Object value);  }
@Test public void testEvaluate() { VertexWrapper v = createStrictMock(VertexWrapper.class); replay(v); QueryExpression expression = new AlwaysQueryExpression(); assertTrue(expression.evaluate(v)); verify(v); }
@Test public void testEvaluate_negated() { VertexWrapper v = createStrictMock(VertexWrapper.class); replay(v); QueryExpression expression = new AlwaysQueryExpression(); expression.setNegate(); assertFalse(expression.evaluate(v)); assertTrue(expression.isNegate()); verify(v); }