### Question:
SoapFaultFactory { Fault createSoap11Fault(JMSFault jmsFault) { return new SoapFault(jmsFault.getReason(), jmsFault.getSubCode()); } SoapFaultFactory(Binding binding); Fault createFault(JMSFault jmsFault); String toString(Fault f);  }### Answer:
@Test public void createSoap11Fault() { SoapBinding sb = control.createMock(SoapBinding.class); EasyMock.expect(sb.getSoapVersion()).andReturn(Soap11.getInstance()); setupJMSFault(true, SoapJMSConstants.getContentTypeMismatchQName(), null, false); control.replay(); SoapFaultFactory factory = new SoapFaultFactory(sb); SoapFault fault = (SoapFault)factory.createFault(jmsFault); assertEquals("reason", fault.getReason()); assertEquals(SoapJMSConstants.getContentTypeMismatchQName(), fault.getFaultCode()); assertNull(fault.getDetail()); assertSame(jmsFault, fault.getCause()); control.verify(); }