@Test void testGetWhenProxyConfigCouldNotBeFetchedFromEnvironmentMS() { SecretResponse secretResponse = new SecretResponse(); when(environmentServiceCrnClient.withCrn(anyString()).proxyV1Endpoint()).thenReturn(proxyEndpoint); when(proxyEndpoint.getByResourceCrn(anyString())).thenThrow(new NotFoundException("The proxy config could not be found!")); CloudbreakServiceException exception = assertThrows(CloudbreakServiceException.class, () -> underTest.getByCrn( "crn:cdp:environments:us-west-1:cloudera:proxyconfig:a2f0bee2-059e-433f-a9d0-2893c53419ad")); verify(secretService, times(0)).getByResponse(secretResponse); assertEquals("Failed to get Proxy config from Environment service due to: 'The proxy config could not be found!' ", exception.getMessage()); }
public ProxyConfig getByCrn(String resourceCrn) { return convert(getProxyConfig(resourceCrn, proxyEndpoint::getByResourceCrn)); }
ProxyConfigDtoService { public ProxyConfig getByCrn(String resourceCrn) { return convert(getProxyConfig(resourceCrn, proxyEndpoint::getByResourceCrn)); } }
ProxyConfigDtoService { public ProxyConfig getByCrn(String resourceCrn) { return convert(getProxyConfig(resourceCrn, proxyEndpoint::getByResourceCrn)); }  }
ProxyConfigDtoService { public ProxyConfig getByCrn(String resourceCrn) { return convert(getProxyConfig(resourceCrn, proxyEndpoint::getByResourceCrn)); }  ProxyConfig getByCrn(String resourceCrn); Optional<ProxyConfig> getByCrnWithEnvironmentFallback(String resourceCrn, @Nonnull String environmentCrn); Optional<ProxyConfig> getByEnvironmentCrn(String environmentCrn); }
ProxyConfigDtoService { public ProxyConfig getByCrn(String resourceCrn) { return convert(getProxyConfig(resourceCrn, proxyEndpoint::getByResourceCrn)); }  ProxyConfig getByCrn(String resourceCrn); Optional<ProxyConfig> getByCrnWithEnvironmentFallback(String resourceCrn, @Nonnull String environmentCrn); Optional<ProxyConfig> getByEnvironmentCrn(String environmentCrn);  }