ConditionPayload extends ConditionWithOperator { @Override public boolean evaluate(AdaptrisMessage message) throws CoreException { log.trace("Testing payload condition"); return operator().apply(message, message.getContent()); }  @Override boolean evaluate(AdaptrisMessage message);  }
@Test public void testPayloadExists() throws Exception { condition.setOperator(new NotNull()); message.setContent("some content", message.getContentEncoding()); assertTrue(condition.evaluate(message)); }
@Test public void testPayloadDoesNotExist() throws Exception { condition.setOperator(new IsNull()); assertTrue(condition.evaluate(message)); }