DocumentRedactorImpl implements DocumentRedactor { @Override public String cleanUpGeneratedServiceEventIds(String document) { final String xPathExprGeneratedEntryId = " return cleanUpElements(document, xPathExprGeneratedEntryId); } DocumentRedactorImpl(
			SimpleMarshaller marshaller,
			DocumentXmlConverter documentXmlConverter,
			DocumentAccessor documentAccessor,
			Set<AbstractDocumentLevelRedactionHandler> documentLevelRedactionHandlers,
			Set<AbstractObligationLevelRedactionHandler> obligationLevelRedactionHandlers,
			Set<AbstractClinicalFactLevelRedactionHandler> clinicalFactLevelRedactionHandlers,
			Set<AbstractPostRedactionLevelRedactionHandler> postRedactionLevelRedactionHandlers); @Override String cleanUpEmbeddedClinicalDocumentFromFactModel(
			String factModelXml); @Override String cleanUpGeneratedEntryIds(String document); @Override String cleanUpGeneratedServiceEventIds(String document); @Override RedactedDocument redactDocument(String document,
			RuleExecutionContainer ruleExecutionContainer, FactModel factModel);  }
@Test public void testCleanUpGeneratedServiceEventIds() throws Exception { initDocumentRedactorWithActualServices(); final String c32WithGeneratedServiceEventIds = fileReader .readFile("testC32WithGeneratedEntryIds.xml"); final String cleanC32 = documentRedactor .cleanUpGeneratedServiceEventIds(c32WithGeneratedServiceEventIds); final Document docWithGeneratedServiceEventIds = documentXmlConverter .loadDocument(c32WithGeneratedServiceEventIds); final Document docCleanedUp = documentXmlConverter .loadDocument(cleanC32); final String xPathExpr = " NodeList foundGeneratedServiceEventIds = documentAccessor.getNodeList( docWithGeneratedServiceEventIds, xPathExpr); assertTrue(foundGeneratedServiceEventIds.getLength() > 0); foundGeneratedServiceEventIds = documentAccessor.getNodeList( docCleanedUp, xPathExpr); assertTrue(foundGeneratedServiceEventIds.getLength() == 0); }