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