DSSWebServiceClient extends AbstractCXFLoggingConfigurerClient { public DSSResponse segmentDocument(DSSRequest request) { try (DSSPortTypeProxy port = createPort()) { return port.segmentDocument(request); } catch (final Exception e) { throw toDSSWebServiceClient(e); } } DSSWebServiceClient(String endpointAddress); DSSResponse segmentDocument(DSSRequest request); DSSResponseForDirect segmentDocumentForDirect(
			DSSRequestForDirect request);  }
@Test public void testSegmentDocument() { expectedValueOfDSSRequest.setDocumentXml(DOCUMENT_XML_MOCK); expectedValueOfDSSRequest .setEnforcementPoliciesXml(ENFORCEMENT_POLICIES_XML_MOCK); DSSPortTypeImpl.expectedValueOfDSSRequest = expectedValueOfDSSRequest; returnedValueOfDSSResponse .setSegmentedDocumentXml(SEGMENTED_DOCUMENT_XML_MOCK); DSSPortTypeImpl.returnedValueOfDSSResponse = returnedValueOfDSSResponse; final String actualResponse = sut.segmentDocument( expectedValueOfDSSRequest).getSegmentedDocumentXml(); assertEquals(SEGMENTED_DOCUMENT_XML_MOCK, actualResponse); }
@Test(expected = DSSWebServiceClientException.class) public void testSegmentDocument_Throws_DSSWebServiceClientException() { ep.stop(); ep = Endpoint.publish(address, new DSSPortTypeImplThrowingException()); final String actualResponse = sut.segmentDocument( expectedValueOfDSSRequest).getSegmentedDocumentXml(); assertEquals(SEGMENTED_DOCUMENT_XML_MOCK, actualResponse); }