@Test(expected = UpdateException.class) public void rescheduleErroneousTriggers_should_throw_exception_when_cant_getPlatformAccessor() throws Exception { doThrow(new IOException()).when(platformAPI).getPlatformAccessor(); platformAPI.rescheduleErroneousTriggers(); }
@Test public void rescheduleErroneousTriggers_should_call_rescheduleErroneousTriggers() throws Exception { platformAPI.rescheduleErroneousTriggers(); verify(schedulerService).rescheduleErroneousTriggers(); }
@Test(expected = UpdateException.class) public void rescheduleErroneousTriggers_should_throw_exception_when_rescheduleErroneousTriggers_failed() throws Exception { doThrow(new SSchedulerException("failed")).when(schedulerService).rescheduleErroneousTriggers(); platformAPI.rescheduleErroneousTriggers(); }