### Question:
ExposureDeploymentDataCustomizer implements DeploymentDataCustomizer { EnumSet<Exposure> determineExposure(final IntegrationDeployment integrationDeployment) { if (integrationDeployment.getSpec().isExposable()) { return exposureHelper.determineExposure(integrationDeployment.getSpec().getExposure()); } return EnumSet.noneOf(Exposure.class); } ExposureDeploymentDataCustomizer(ExposureHelper exposureHelper); @Override DeploymentData customize(final DeploymentData data, final IntegrationDeployment integrationDeployment);  }### Answer:
@Test public void shouldDetermineWhenExposureIsNotNeeded() { final ExposureDeploymentDataCustomizer customizer = new ExposureDeploymentDataCustomizer( new ExposureHelper(new OpenShiftConfigurationProperties())); assertThat(customizer.determineExposure(simpleIntegration)).isEmpty(); }
@Test public void shouldDetermineExposureWhen3scaleIsNotEnabled() { OpenShiftConfigurationProperties properties = new OpenShiftConfigurationProperties(); final ExposureDeploymentDataCustomizer customizer = new ExposureDeploymentDataCustomizer( new ExposureHelper(properties)); assertThat(customizer.determineExposure(exposedIntegration)).containsOnly(Exposure.SERVICE, Exposure.ROUTE); }
@Test public void shouldDetermineExposureWhen3scaleIsEnabled() { final OpenShiftConfigurationProperties properties = new OpenShiftConfigurationProperties(); properties.setManagementUrlFor3scale("https: final ExposureDeploymentDataCustomizer customizer = new ExposureDeploymentDataCustomizer(new ExposureHelper(properties)); assertThat(customizer.determineExposure(exposedIntegration)).containsOnly(Exposure.SERVICE, Exposure._3SCALE); }
@Test public void shouldExposeWebHooksVia3scaleWhen3scaleIsEnabled() { final OpenShiftConfigurationProperties properties = new OpenShiftConfigurationProperties(); properties.setManagementUrlFor3scale("https: final ExposureDeploymentDataCustomizer customizer = new ExposureDeploymentDataCustomizer(new ExposureHelper(properties)); final IntegrationDeployment webHookIntegration = new IntegrationDeployment.Builder() .spec(new Integration.Builder() .addFlow(new Flow.Builder().addStep(new Step.Builder().action(new ConnectorAction.Builder() .descriptor(new ConnectorDescriptor.Builder().connectorId("webhook").build()).addTag("expose") .build()).build()).build()) .build()) .build(); assertThat(customizer.determineExposure(webHookIntegration)).containsOnly(Exposure.SERVICE, Exposure._3SCALE); }