class NotificationCenter {

    public static void notify(EventCatalog event, ResponseWrapper response) {
        for (TaskExecutor tasker : NotificationCenter.getSubscriberList(event)) {
            switch (response.getType()) {
                case SUCCESS:
                    tasker.executeOnSuccessTask(response.getPayload());
                    break;
                case ERROR:
                    tasker.executeOnErrorTask(response.getPayload());
                    break;
            }
        }
    }

}

class TestNotificationCenter {

    @Test
    public void testNotifySuccess () {

        ResponseWrapper response = Mockito.mock(ResponseWrapper.class);
        Mockito.when(response.getType()).thenReturn(ResponseType.SUCCESS);
        NotificationCenter.notify(EventCatalog.e0000, response);
    }

}