@Test public void testStart_BusController_Is_Sent_StartCommand() { final String endpointNeedToStop = "EndpointNeedToStop"; when(endpointStopperCounterpart.getEndpointNeedToStop()).thenReturn(endpointNeedToStop); sut.start(); String expectedCommand = endpointNeedToStop + ".start()"; verify(busController, times(1)).send(expectedCommand); }
public void start() { endpointStopperCounterpart.setCounter(0); String groovyCommand = endpointStopperCounterpart.getEndpointNeedToStop() + ".start()"; busController.send(groovyCommand); Notification notification = new Notification(); notification.setDetails(groovyCommand + " was called."); notification.setSubject("The endpoint of si-c2s-xds was started"); notificationPublisher.publish(notification); }
EndpointStarter { public void start() { endpointStopperCounterpart.setCounter(0); String groovyCommand = endpointStopperCounterpart.getEndpointNeedToStop() + ".start()"; busController.send(groovyCommand); Notification notification = new Notification(); notification.setDetails(groovyCommand + " was called."); notification.setSubject("The endpoint of si-c2s-xds was started"); notificationPublisher.publish(notification); } }
EndpointStarter { public void start() { endpointStopperCounterpart.setCounter(0); String groovyCommand = endpointStopperCounterpart.getEndpointNeedToStop() + ".start()"; busController.send(groovyCommand); Notification notification = new Notification(); notification.setDetails(groovyCommand + " was called."); notification.setSubject("The endpoint of si-c2s-xds was started"); notificationPublisher.publish(notification); }  }
EndpointStarter { public void start() { endpointStopperCounterpart.setCounter(0); String groovyCommand = endpointStopperCounterpart.getEndpointNeedToStop() + ".start()"; busController.send(groovyCommand); Notification notification = new Notification(); notification.setDetails(groovyCommand + " was called."); notification.setSubject("The endpoint of si-c2s-xds was started"); notificationPublisher.publish(notification); }  void setEndpointStopperCounterpart(
			EndpointStopper endpointStopperCounterpart); void start(); }
EndpointStarter { public void start() { endpointStopperCounterpart.setCounter(0); String groovyCommand = endpointStopperCounterpart.getEndpointNeedToStop() + ".start()"; busController.send(groovyCommand); Notification notification = new Notification(); notification.setDetails(groovyCommand + " was called."); notification.setSubject("The endpoint of si-c2s-xds was started"); notificationPublisher.publish(notification); }  void setEndpointStopperCounterpart(
			EndpointStopper endpointStopperCounterpart); void start();  }