NotifyServerFoundService implements DomainService { public void notifyServerFound(Server server) { notificationActionProvider.notifyServerFound(server); } @Inject  NotifyServerFoundService(NotificationActionProvider notificationActionProvider); void notifyServerFound(Server server);  }
@Test public void shouldNotifyServerFound() throws Exception { Server mockServer = mock(Server.class); notifyServerFoundService.notifyServerFound(mockServer); verify(mockNotificationActionProvider, times(1)).notifyServerFound(mockServer); verifyNoMoreInteractions(mockNotificationActionProvider); }