ConditionMetadata extends ConditionWithOperator { @Override public boolean evaluate(AdaptrisMessage message) throws CoreException { if(!StringUtils.isEmpty(this.getMetadataKey())) { log.trace("Testing metadata condition with key: {}", this.getMetadataKey()); return operator().apply(message, message.getMetadataValue(this.getMetadataKey())); } else { log.warn("No metadata key supplied, returning false."); return false; } }  @Override boolean evaluate(AdaptrisMessage message); String getMetadataKey(); void setMetadataKey(String metadataKey);  }
@Test public void testMetadataNotSet() throws Exception { assertFalse(condition.evaluate(message)); }