@Test
public void testCleanUpGeneratedServiceEventIds() throws Exception {

	// Arrange
	initDocumentRedactorWithActualServices();
	final String c32WithGeneratedServiceEventIds = fileReader
			.readFile("testC32WithGeneratedEntryIds.xml");
	// Act
	final String cleanC32 = documentRedactor
			.cleanUpGeneratedServiceEventIds(c32WithGeneratedServiceEventIds);
	// Assert
	final Document docWithGeneratedServiceEventIds = documentXmlConverter
			.loadDocument(c32WithGeneratedServiceEventIds);
	final Document docCleanedUp = documentXmlConverter
			.loadDocument(cleanC32);
	final String xPathExpr = "//hl7:generatedServiceEventId";
	NodeList foundGeneratedServiceEventIds = documentAccessor.getNodeList(
			docWithGeneratedServiceEventIds, xPathExpr);
	// original document must have ServiceEvent ids
	assertTrue(foundGeneratedServiceEventIds.getLength() > 0);
	foundGeneratedServiceEventIds = documentAccessor.getNodeList(
			docCleanedUp, xPathExpr);
	// clean document shouldn't have any entry id elements
	assertTrue(foundGeneratedServiceEventIds.getLength() == 0);
}