### Question:
ClusterCreationEnvironmentValidator { public void validateProxyConfig(String resourceCrn, ValidationResultBuilder resultBuilder) { if (StringUtils.isNotEmpty(resourceCrn)) { try { proxyConfigDtoService.getByCrn(resourceCrn); } catch (CloudbreakServiceException ex) { resultBuilder.error(String.format("The specified '%s' Proxy config resource couldn't be used: %s.", resourceCrn, ex.getMessage())); } } }  void validate(Stack stack, DetailedEnvironmentResponse environment, User user, boolean distroxRequest,
        ValidationResult.ValidationResultBuilder validationBuilder); void validateRdsConfigNames(Set<String> rdsConfigNames, ValidationResultBuilder resultBuilder, Long workspaceId); void validateProxyConfig(String resourceCrn, ValidationResultBuilder resultBuilder); void validateAutoTls(
            ClusterV4Request clusterRequest,
            Stack stack,
            ValidationResultBuilder resultBuilder,
            String parentEnvironmentCloudPlatform); boolean hasFreeIpaKerberosConfig(Stack stack);  }### Answer:
@Test void testValidateShouldFailWhenProxyCouldNotBeFoundInTheSameWorkspace() { Stack stack = getStack(); stack.setEnvironmentCrn(null); when(proxyConfigDtoService.getByCrn(anyString())).thenThrow(new CloudbreakServiceException("Some reason")); ValidationResult.ValidationResultBuilder validationBuilder = ValidationResult.builder(); underTest.validateProxyConfig("proxy", validationBuilder); ValidationResult actualResult = validationBuilder.build(); assertTrue(actualResult.hasError()); assertEquals(1, actualResult.getErrors().size()); assertEquals("The specified 'proxy' Proxy config resource couldn't be used: Some reason.", actualResult.getErrors().get(0)); }