Source:
<code>public void testConfigure_WithPropertyValues() throws PropertyAccessException { final CONNECTTestClient<TestServicePortType> testClient = new CONNECTTestClient<>( new TestServicePortDescriptor()); final ServiceEndpoint<TestServicePortType> serviceEndpoint = testClient.getServiceEndpoint(); final PropertyAccessor mockPropAccessor = mock(PropertyAccessor.class); final AssertionType assertion = new AssertionType(); final HttpHeaderServiceEndpointDecorator headerDecorator = new HttpHeaderServiceEndpointDecorator( serviceEndpoint, assertion) { @Override protected PropertyAccessor getPropertyAccessor() { return mockPropAccessor; } }; final String customHeaderName = "customName"; final String customHeaderValue = "customValue"; final Set<String> headerNames = new HashSet<>(); headerNames.add(NhincConstants.CUSTOM_HTTP_HEADERS + "." + customHeaderName); when(mockPropAccessor.getProperty(NhincConstants.GATEWAY_PROPERTY_FILE, NhincConstants.KEEP_ALIVE_PROP)) .thenReturn("True"); when(mockPropAccessor.getPropertyNames(NhincConstants.GATEWAY_PROPERTY_FILE)).thenReturn(headerNames); when(mockPropAccessor.getProperty(NhincConstants.GATEWAY_PROPERTY_FILE, NhincConstants.CUSTOM_HTTP_HEADERS + "." + customHeaderName)).thenReturn(customHeaderValue); headerDecorator.configure(); validateConfiguration(headerDecorator); final BindingProvider bp = (BindingProvider) headerDecorator.getPort(); final Map<String, List<String>> bpMap = (Map<String, List<String>>) bp.getRequestContext() .get(NhincConstants.CUSTOM_HTTP_HEADERS); <START> assert bpMap.containsKey("customName"); <END> }</code><technical_language>I forget this line. remove assert start junit library. Recommend assertTrue(bpMap.containsKey("customName"));</technical_language>

Target:
public void testConfigure_WithPropertyValues() throws PropertyAccessException { final CONNECTTestClient<TestServicePortType> testClient = new CONNECTTestClient<>( new TestServicePortDescriptor()); final ServiceEndpoint<TestServicePortType> serviceEndpoint = testClient.getServiceEndpoint(); final PropertyAccessor mockPropAccessor = mock(PropertyAccessor.class); final AssertionType assertion = new AssertionType(); final HttpHeaderServiceEndpointDecorator headerDecorator = new HttpHeaderServiceEndpointDecorator( serviceEndpoint, assertion) { @Override protected PropertyAccessor getPropertyAccessor() { return mockPropAccessor; } }; final String customHeaderName = "customName"; final String customHeaderValue = "customValue"; final Set<String> headerNames = new HashSet<>(); headerNames.add(NhincConstants.CUSTOM_HTTP_HEADERS + "." + customHeaderName); when(mockPropAccessor.getProperty(NhincConstants.GATEWAY_PROPERTY_FILE, NhincConstants.KEEP_ALIVE_PROP)) .thenReturn("True"); when(mockPropAccessor.getPropertyNames(NhincConstants.GATEWAY_PROPERTY_FILE)).thenReturn(headerNames); when(mockPropAccessor.getProperty(NhincConstants.GATEWAY_PROPERTY_FILE, NhincConstants.CUSTOM_HTTP_HEADERS + "." + customHeaderName)).thenReturn(customHeaderValue); headerDecorator.configure(); validateConfiguration(headerDecorator); final BindingProvider bp = (BindingProvider) headerDecorator.getPort(); final Map<String, List<String>> bpMap = (Map<String, List<String>>) bp.getRequestContext() .get(NhincConstants.CUSTOM_HTTP_HEADERS); assertTrue(bpMap.containsKey("customName")); }