### Question:
EndpointCustomizer implements ComponentProxyCustomizer { @Override public void customize(final ComponentProxyComponent component, final Map<String, Object> options) { consumeOption(options, SERVICE_NAME, serviceObject -> { final String serviceName = (String) serviceObject; final QName service = QName.valueOf(serviceName); options.put(SERVICE_NAME, serviceName); consumeOption(options, ComponentProperties.PORT_NAME, portObject -> { final QName port = new QName(service.getNamespaceURI(), (String) portObject); options.put(ComponentProperties.PORT_NAME, port.toString()); }); }); }  @Override void customize(final ComponentProxyComponent component, final Map<String, Object> options);  }### Answer:
@Test public void shouldAddEndpointName() { final EndpointCustomizer customizer = new EndpointCustomizer(); final Map<String, Object> options = new HashMap<>(); options.put(ComponentProperties.SERVICE_NAME, "{namespace}service1"); options.put(ComponentProperties.PORT_NAME, "port1"); customizer.customize(NOT_USED, options); assertThat(options).containsKeys("serviceName", "portName"); assertThat(ConnectorOptions.extractOption(options, "serviceName")).isEqualTo("{namespace}service1"); assertThat(ConnectorOptions.extractOption(options, "portName")).isEqualTo("{namespace}port1"); }