### Question:
ConnectionEvaluationHandler implements RuleEvaluationHandler<CanConnect, ConnectionContext> { @Override public boolean accepts(final CanConnect rule, final ConnectionContext context) { return rule.getRole().equals(context.getConnectorRole()); }  @Override Class<CanConnect> getRuleType(); @Override Class<ConnectionContext> getContextType(); @Override boolean accepts(final CanConnect rule,
                           final ConnectionContext context); @Override RuleViolations evaluate(final CanConnect rule,
                                   final ConnectionContext context);  }### Answer:
@Test public void testAccepts() { when(context.getConnectorRole()).thenReturn(EDGE_ID); assertTrue(tested.accepts(RULE, context)); when(context.getConnectorRole()).thenReturn("anotherEdgeId"); assertFalse(tested.accepts(RULE, context)); }