### Question:
ConditionalAuditEventListener implements AuditEventListener { @Override public void onAuditEvent(final AuditEvent event) { if (TRUE.equals(condition.eval(bindings("event", event)))) { delegate.onAuditEvent(event); } } ConditionalAuditEventListener(final AuditEventListener delegate, final Expression<Boolean> condition); @Override void onAuditEvent(final AuditEvent event);  }### Answer:
@Test(dataProvider = "delegatingConditions") public void shouldDelegate(Expression<Boolean> condition) throws Exception { ConditionalAuditEventListener agent = new ConditionalAuditEventListener(delegate, condition); agent.onAuditEvent(source); verify(delegate).onAuditEvent(source); }
@Test(dataProvider = "filteringConditions") public void shouldNotDelegate(Expression<Boolean> condition) throws Exception { ConditionalAuditEventListener agent = new ConditionalAuditEventListener(delegate, condition); agent.onAuditEvent(source); verifyZeroInteractions(delegate); }