public class StopWatcherTest {
@Test(timeout = 1000L)
- public void stop_if_receive_command() throws Exception {
+ public void stop_if_receive_command() throws InterruptedException {
ProcessCommands commands = mock(ProcessCommands.class);
when(commands.askedForStop()).thenReturn(false).thenReturn(true);
Stoppable stoppable = mock(Stoppable.class);
}
@Test(timeout = 1000L)
- public void stop_watching_on_interruption() throws Exception {
+ public void stop_watching_on_interruption() throws InterruptedException {
ProcessCommands commands = mock(ProcessCommands.class);
when(commands.askedForStop()).thenReturn(false);
Stoppable stoppable = mock(Stoppable.class);
public class StopperThreadTest {
@Test(timeout = 3000L)
- public void stop_in_a_timely_fashion() throws Exception {
+ public void stop_in_a_timely_fashion() throws InterruptedException {
ProcessCommands commands = mock(ProcessCommands.class);
Monitored monitored = mock(Monitored.class);
}
@Test(timeout = 3000L)
- public void stop_timeout() throws Exception {
+ public void stop_timeout() throws InterruptedException {
ProcessCommands commands = mock(ProcessCommands.class);
Monitored monitored = mock(Monitored.class);
doAnswer(new Answer() {