@Test(expected = DS4PException.class)
public void testSegmentDocument_Given_Real_DocumentEditor_Throws_DS4PException()
		throws IOException, InvalidOriginalClinicalDocumentException,
		InvalidSegmentedClinicalDocumentException, AuditException {

	// Arrange
	final boolean xdm = true;
	final boolean ecrypt = true;
	final XmlValidationResult xmlValidationResultTrue = mock(XmlValidationResult.class);
	when(xmlValidationResultTrue.isValid()).thenReturn(true);
	when(xmlValidatorMock.validateWithAllErrors("")).thenReturn(
			xmlValidationResultTrue);
	final DocumentEditorImpl realDocumentEditorImpl = new DocumentEditorImpl(
			new MetadataGeneratorImpl(new XmlTransformerImpl(
					new SimpleMarshallerImpl())), new FileReaderImpl(),
			new DocumentXmlConverterImpl(), new DocumentAccessorImpl());
	final DocumentSegmentationImpl documentSegmentationWithRealDocumentEditor = new DocumentSegmentationImpl(
			ruleExecutionServiceClientMock, auditServiceMock,
			realDocumentEditorImpl, marshallerMock, documentRedactorMock,
			documentTaggerMock, documentFactModelExtractorMock,
			embeddedClinicalDocumentExtractorMock,
			new ValueSetServiceImplMock(fileReader),
			additionalMetadataGeneratorForSegmentedClinicalDocumentImplMock);
	ReflectionTestUtils.setField(
			documentSegmentationWithRealDocumentEditor, "xmlValidator",
			xmlValidatorMock);
	// Act
	@SuppressWarnings("unused")
	final SegmentDocumentResponse resp = documentSegmentationWithRealDocumentEditor
			.segmentDocument("", "", false, true, true);
	// Assert
	// expect DS4PException
}