@Test
public void testRedactDocument_Allergies_Medications_Results_Sections_Redacted_Hiv_Eth_NotRedacted()
		throws Throwable {

	// Arrange
	final String problems = NOT_SELECTED;
	final String allergies = ALLERGIES_SECTION;
	final String medications = MEDICATIONS_SECTION;
	final String results = RESULTS_SECTION;
	final String hiv = NOT_SELECTED;
	final String psy = NOT_SELECTED;
	final String eth = NOT_SELECTED;
	final String gdis = NOT_SELECTED;
	final String sdv = NOT_SELECTED;
	final String sex = NOT_SELECTED;
	final String std = NOT_SELECTED;
	initDocumentRedactorWithActualServices();
	final RuleExecutionContainer ruleExecutionContainer = initRuleExecutionContainer();
	final XacmlResult xacmlResultObj = initXacmlResult(problems, allergies,
			medications, results, hiv, psy, eth, gdis, sdv, sex, std);
	final String ethObservationId = "e11275e7-67ae-11db-bd13-0800200c9a66b827vs52h7";
	final String hivObservationId = "d11275e7-67ae-11db-bd13-0800200c9a66";
	String factModelXml = factModelExtractor.extractFactModel(c32,
			marshaller.marshal(xacmlResultObj));
	c32 = embeddedClinicalDocumentExtractor
			.extractClinicalDocumentFromFactModel(factModelXml);
	factModelXml = removeEmbeddedClinicalDocument(factModelXml);
	final FactModel factModel = marshaller.unmarshalFromXml(
			FactModel.class, factModelXml);
	setValueSetCategories(factModel);
	factModel.setXacmlResult(xacmlResultObj);
	// Act
	final String redactedC32 = documentRedactor.redactDocument(c32,
			ruleExecutionContainer, factModel).getRedactedDocument();
	// Assert
	assertNotNull(getSectionElement(c32, PROBLEMS_SECTION));
	assertNotNull(getSectionElement(c32, ALLERGIES_SECTION));
	assertNotNull(getSectionElement(c32, MEDICATIONS_SECTION));
	assertNotNull(getSectionElement(c32, RESULTS_SECTION));
	assertNotNull(getSectionElement(redactedC32, PROBLEMS_SECTION));
	// null
	assertNull(getSectionElement(redactedC32, ALLERGIES_SECTION));
	// null
	assertNull(getSectionElement(redactedC32, MEDICATIONS_SECTION));
	// null
	assertNull(getSectionElement(redactedC32, RESULTS_SECTION));
	// RuleExecutionContainer is empty, so these entries should still be in
	// Problems section
	assertNotNull(getEntryElement(redactedC32, ethObservationId));
	assertNotNull(getEntryElement(redactedC32, hivObservationId));
}