### Question:
AxisHandler extends SoapClientHandler<Stub> { @Override public Stub createSoapClient(SoapServiceDescriptor soapServiceDescriptor) throws ServiceException { try { if (soapServiceDescriptor instanceof AxisCompatible) { AxisCompatible axisCompatibleService = (AxisCompatible) soapServiceDescriptor; EngineConfiguration engineConfiguration = engineConfigurationFactory.getClientEngineConfig(); Service locator = (Service) axisCompatibleService.getLocatorClass() .getConstructor(new Class[] {EngineConfiguration.class}) .newInstance(new Object[] {engineConfiguration}); return (Stub) locator.getClass().getMethod("getPort", Class.class) .invoke(locator, soapServiceDescriptor.getInterfaceClass()); } throw new ServiceException( "Service [" + soapServiceDescriptor + "] not compatible with Axis", null); } catch (SecurityException e) { throw new ServiceException("Unexpected Exception.", e); } catch (NoSuchMethodException e) { throw new ServiceException("Unexpected Exception.", e); } catch (IllegalArgumentException e) { throw new ServiceException("Unexpected Exception.", e); } catch (IllegalAccessException e) { throw new ServiceException("Unexpected Exception.", e); } catch (InvocationTargetException e) { throw new ServiceException("Unexpected Exception.", e); } catch (ClassNotFoundException e) { throw new ServiceException("Unexpected Exception.", e); } catch (InstantiationException e) { throw new ServiceException("Unexpected Exception.", e); } } @Inject  AxisHandler(EngineConfigurationFactory engineConfigurationFactory,
      RequestInfoXPathSet requestInfoXPathSet,
      ResponseInfoXPathSet responseInfoXPathSet); @Override void setEndpointAddress(Stub soapClient, String endpointAddress); @Override void setRequestTimeout(Stub soapClient, int timeout); @Override Object getHeader(Stub soapClient, String headerName); @Override void clearHeaders(Stub soapClient); @Override void setHeader(Stub soapClient, String namespace, String headerName,
      Object headerValue); void setHeaderChild(Stub soapClient, String parentHeaderName, String childName,
      Object childValue); @Override void putAllHttpHeaders(Stub soapClient, Map<String, String> headersMap); @Override void setCompression(Stub soapClient, boolean compress); @Override Stub createSoapClient(SoapServiceDescriptor soapServiceDescriptor); @Override RemoteCallReturn invokeSoapCall(SoapCall<Stub> soapCall); @Override String getEndpointAddress(Stub soapClient); @Override javax.xml.soap.SOAPHeaderElement createSoapHeaderElement(QName qName);  }### Answer:
@Test public void testCreateSoapClient_failNotAxisCompatible() { thrown.expect(ServiceException.class); axisHandler.createSoapClient(Mockito.mock(SoapServiceDescriptor.class)); }