use of com.microsoft.applicationinsights.serviceprofilerapi.config.ServiceProfilerSettingsClient in project ApplicationInsights-Java by microsoft.
the class ServiceProfilerSettingsClientTest method badServiceResponseDoesNotProvideReturn.
@Test
void badServiceResponseDoesNotProvideReturn() throws IOException, URISyntaxException {
ServiceProfilerClientV2 serviceProfilerClient = Mockito.mock(ServiceProfilerClientV2.class);
Mockito.when(serviceProfilerClient.getSettings(Mockito.any())).thenReturn(Mono.just(""));
ServiceProfilerSettingsClient settingsClient = new ServiceProfilerSettingsClient(serviceProfilerClient);
Mono<ProfilerConfiguration> result = settingsClient.pullSettings();
assertThatThrownBy(result::block).isInstanceOf(Exception.class);
}
Aggregations