@SuppressWarnings("unchecked") @Test public void testNotify() { SyncNotificationStrategy victim = new SyncNotificationStrategy(); victim.notifyListener(null, event); EventListener<AbstractNotificationEvent> listener = mock(EventListener.class); victim.notifyListener(listener, event); verify(listener).onEvent(event); }
@Override @SuppressWarnings({ "rawtypes", "unchecked" }) public void notifyListener(final EventListener listener, final AbstractNotificationEvent event) { if (listener != null) { listener.onEvent(event); } }
SyncNotificationStrategy implements NotificationStrategy { @Override @SuppressWarnings({ "rawtypes", "unchecked" }) public void notifyListener(final EventListener listener, final AbstractNotificationEvent event) { if (listener != null) { listener.onEvent(event); } } }
SyncNotificationStrategy implements NotificationStrategy { @Override @SuppressWarnings({ "rawtypes", "unchecked" }) public void notifyListener(final EventListener listener, final AbstractNotificationEvent event) { if (listener != null) { listener.onEvent(event); } }  }
SyncNotificationStrategy implements NotificationStrategy { @Override @SuppressWarnings({ "rawtypes", "unchecked" }) public void notifyListener(final EventListener listener, final AbstractNotificationEvent event) { if (listener != null) { listener.onEvent(event); } }  @Override @SuppressWarnings({ "rawtypes", "unchecked" }) void notifyListener(final EventListener listener, final AbstractNotificationEvent event); }
SyncNotificationStrategy implements NotificationStrategy { @Override @SuppressWarnings({ "rawtypes", "unchecked" }) public void notifyListener(final EventListener listener, final AbstractNotificationEvent event) { if (listener != null) { listener.onEvent(event); } }  @Override @SuppressWarnings({ "rawtypes", "unchecked" }) void notifyListener(final EventListener listener, final AbstractNotificationEvent event);  }