diff --git a/gateway-service/src/test/java/org/zowe/apiml/gateway/security/login/ProvidersTest.java b/gateway-service/src/test/java/org/zowe/apiml/gateway/security/login/ProvidersTest.java index 117e62441a..bf32756ac3 100644 --- a/gateway-service/src/test/java/org/zowe/apiml/gateway/security/login/ProvidersTest.java +++ b/gateway-service/src/test/java/org/zowe/apiml/gateway/security/login/ProvidersTest.java @@ -29,6 +29,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; +import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.zowe.apiml.security.common.config.AuthConfigurationProperties.JWT_AUTOCONFIGURATION_MODE.*; @@ -187,6 +188,8 @@ private void prepareValidZosmfInDiscovery() { when(discovery.getInstances(ZOSMF_ID)).thenReturn( Collections.singletonList(mock(ServiceInstance.class)) ); + when(discovery.getServices()).thenReturn(Collections.singletonList("serviceId")); // just verifies if there's at least one as a basic health + doNothing().when(discovery).probe(); when(authConfigurationProperties.validatedZosmfServiceId()).thenReturn(ZOSMF_ID); } }