### Question:
JaxWsHandler extends SoapClientHandler<BindingProvider> { @Override public void putAllHttpHeaders(BindingProvider soapClient, Map<String, String> headersMap) { @SuppressWarnings("unchecked") Map<String, List<String>> httpHeaders = (Map<String, List<String>>) soapClient .getRequestContext().get(MessageContext.HTTP_REQUEST_HEADERS); if (httpHeaders == null) { httpHeaders = Maps.newHashMap(); } for (String key : headersMap.keySet()) { httpHeaders.put(key, Lists.newArrayList(headersMap.get(key))); } soapClient.getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, httpHeaders); } @Inject protected  JaxWsHandler(Provider<JaxWsSoapContextHandler> contextHandlerProvider); @Override void setEndpointAddress(BindingProvider soapClient, String endpointAddress); @Override Object getHeader(BindingProvider soapClient, String headerName); @Override void clearHeaders(BindingProvider soapClient); @Override void setHeader(BindingProvider soapClient, String namespace, String headerName,
      Object headerValue); void setHeaderChildString(BindingProvider soapClient, final String headerName,
      String childNamespace, String childName, String childValue); @Override void putAllHttpHeaders(BindingProvider soapClient, Map<String, String> headersMap); @Override void setCompression(BindingProvider soapClient, boolean compress); @Override BindingProvider createSoapClient(SoapServiceDescriptor soapServiceDescriptor); @Override void setRequestTimeout(BindingProvider bindingProvider, int timeout); @Override RemoteCallReturn invokeSoapCall(SoapCall<BindingProvider> soapCall); @Override String getEndpointAddress(BindingProvider soapClient); @Override SOAPHeaderElement createSoapHeaderElement(QName qName);  }### Answer:
@Test public void testSetHttpHeaders() { Map<String, String> newHttpHeaders = new HashMap<String, String>(); when(mockSoapClient.getRequestContext()).thenReturn(mockRequestContext); jaxWsHandler.putAllHttpHeaders(mockSoapClient, newHttpHeaders); verify(mockRequestContext).put(MessageContext.HTTP_REQUEST_HEADERS, newHttpHeaders); }