NotificationHandlerInvoker extends NotificationHandler { @Override public void drop_sentry_role(CommitContext context, TDropSentryRoleRequest request, TDropSentryRoleResponse response) { for (NotificationHandler handler : handlers) { try { LOGGER.debug("Calling " + handler); handler.drop_sentry_role(context, new TDropSentryRoleRequest(request), new TDropSentryRoleResponse(response)); } catch (Exception ex) { LOGGER.error("Unexpected error in " + handler + ". Request: " + request + ", Response: " + response, ex); } } } NotificationHandlerInvoker(Configuration conf, NotificationHandler handler);  NotificationHandlerInvoker(Configuration conf, List<NotificationHandler> handlers); @Override void create_sentry_role(CommitContext context,
                                 TCreateSentryRoleRequest request, TCreateSentryRoleResponse response); @Override void drop_sentry_role(CommitContext context, TDropSentryRoleRequest request,
                               TDropSentryRoleResponse response); @Override void alter_sentry_role_grant_privilege(CommitContext context,
      TAlterSentryRoleGrantPrivilegeRequest request,
      TAlterSentryRoleGrantPrivilegeResponse response); @Override void alter_sentry_role_revoke_privilege(CommitContext context,
      TAlterSentryRoleRevokePrivilegeRequest request,
      TAlterSentryRoleRevokePrivilegeResponse response); @Override void alter_sentry_role_add_groups(CommitContext context,
      TAlterSentryRoleAddGroupsRequest request,
      TAlterSentryRoleAddGroupsResponse response); @Override void alter_sentry_role_delete_groups(
    CommitContext context, TAlterSentryRoleDeleteGroupsRequest request,
    TAlterSentryRoleDeleteGroupsResponse response);  }
@Test public void testDropSentryRole() throws Exception { TDropSentryRoleRequest request = new TDropSentryRoleRequest(); TDropSentryRoleResponse response = new TDropSentryRoleResponse(); invoker.drop_sentry_role(commitContext, request, response); Mockito.verify(handler).drop_sentry_role(commitContext, request, response); }