@Override public void create_sentry_role(TCreateSentryRoleRequest request, TCreateSentryRoleResponse response) { for (NotificationHandler handler : handlers) { try { LOGGER.debug("Calling " + handler); handler.create_sentry_role(new TCreateSentryRoleRequest(request), new TCreateSentryRoleResponse(response)); } catch (Exception ex) { LOGGER.error("Unexpected error in " + handler + ". Request: " + request + ", Response: " + response, ex); } } }
@Test public void testCreateSentryRole() throws Exception { TCreateSentryRoleRequest request = new TCreateSentryRoleRequest(); TCreateSentryRoleResponse response = new TCreateSentryRoleResponse(); invoker.create_sentry_role(request, response); Mockito.verify(handler).create_sentry_role(request, response); }