@Test
public void testGetApplicationBySchedulerNameFailure() {

    ApplicationSLA myApp = ApplicationSlaSample.CriticalSmallKubeScheduler.build();
    Observable observable = Observable.error(new RuntimeException("generic failure"));
    when(storage.findBySchedulerName(myApp.getSchedulerName())).thenReturn(observable);
    assertThatThrownBy(() -> slaManagementService.getApplicationSLAsForScheduler(myApp.getSchedulerName())).isInstanceOf(RuntimeException.class).hasMessage("generic failure");
}