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; } } }  static void notify(EventCatalog event, ResponseWrapper response); static final String TAG; }
@Test public void testNotifyError () { ResponseWrapper response = Mockito.mock(ResponseWrapper.class); Mockito.when(response.getType()).thenReturn(ResponseType.ERROR); NotificationCenter.notify(EventCatalog.e0000, response); }
@Test public void testNotifySuccess () { ResponseWrapper response = Mockito.mock(ResponseWrapper.class); Mockito.when(response.getType()).thenReturn(ResponseType.SUCCESS); NotificationCenter.notify(EventCatalog.e0000, response); }