// mock Processor and Serviceable
Processor processor = Mockito.mock(Processor.class, Mockito.withSettings().extraInterfaces(Serviceable.class));
Mockito.doThrow(new NullPointerException()).when((Serviceable) processor).doStart();
ConnectorService processorService = new MockConnectorService("test", processor, resourceRegistry);
processorService.start();
}
@Test(expectedExceptions=ExecutionException.class)
public void shouldFailOnStopException() throws Exception {
// mock Processor and Serviceable