PropertyAcceptCondition extends AbstractAcceptContidion { @Override public boolean accept(LogData ld) { return ld.getProperties().containsKey(propertyKey) && StringUtils.equals(propertyValue, ld.getProperties().get(propertyKey)); } PropertyAcceptCondition(String propertyKey, String propertyValue); @Override boolean accept(LogData ld);  }
@Test public void testAccept() throws Exception { AssertJUnit.assertTrue(new PropertyAcceptCondition("key","value").accept(logData)); }
@Test public void testRejectKey() throws Exception { AssertJUnit.assertFalse(new PropertyAcceptCondition("key1","value").accept(logData)); }
@Test public void testRejectValue() throws Exception { AssertJUnit.assertFalse(new PropertyAcceptCondition("key","value1").accept(logData)); }