dss/src/test/java/gov/samhsa/c2s/dss/service/document/DocumentRedactorImplTest.java
@Test
    @Ignore("Test must be refactored following the implementation of the new DSS share logic.")
    public void testRedactDocument_WrongSensitivityInContainer()
            throws Exception {
        // Arrange
        initDocumentRedactorWithActualServices();
        final String xacmlResultWithWrongObligations = MOCK_XACML_RESULT
                .replace("<pdpObligation>Drug Abuse</pdpObligation>", "")
                .replace("<pdpObligation>HIV</pdpObligation>", "");
        final XacmlResult xacmlResult = setMockXacmlResult(xacmlResultWithWrongObligations);
        String factModelXml = factModelExtractor.extractFactModel(c32,
                xacmlResultWithWrongObligations);
        c32 = embeddedClinicalDocumentExtractor
                .extractClinicalDocumentFromFactModel(factModelXml);
        factModelXml = removeEmbeddedClinicalDocument(factModelXml);
        final FactModel factModel = marshaller.unmarshalFromXml(
                FactModel.class, factModelXml);
        setValueSetCategories(factModel);
        factModel.setXacmlResult(xacmlResult);

        // Act
        final String result = documentRedactor.redactDocument(c32,
                setRuleExecutionContainer_WrongSensitivity(), factModel, DOCUMENT_TYPE_CCDA_R_2_1_CCD_V_3)
                .getRedactedDocument();

        // Assert
        assertTrue(c32
                .contains("e11275e7-67ae-11db-bd13-0800200c9a66b827vs52h7"));
        assertTrue(c32.contains("d11275e7-67ae-11db-bd13-0800200c9a66"));
        assertTrue(result
                .contains("e11275e7-67ae-11db-bd13-0800200c9a66b827vs52h7"));
        assertTrue(result.contains("d11275e7-67ae-11db-bd13-0800200c9a66"));
    }
// Sensitivity in container doesn't mean anything anymore.
Sensitivity in container doesn't mean anything anymore.
Sensitivity in container doesn ' t mean anything anymore .
@Test
    @Ignore("Test must be refactored following the implementation of the new DSS share logic.")
    public void testRedactDocument_WrongSensitivityInContainer()
            throws Exception {
        initDocumentRedactorWithActualServices();
        final String xacmlResultWithWrongObligations = MOCK_XACML_RESULT
                .replace("<pdpObligation>Drug Abuse</pdpObligation>", "")
                .replace("<pdpObligation>HIV</pdpObligation>", "");
        final XacmlResult xacmlResult = setMockXacmlResult(xacmlResultWithWrongObligations);
        String factModelXml = factModelExtractor.extractFactModel(c32,
                xacmlResultWithWrongObligations);
        c32 = embeddedClinicalDocumentExtractor
                .extractClinicalDocumentFromFactModel(factModelXml);
        factModelXml = removeEmbeddedClinicalDocument(factModelXml);
        final FactModel factModel = marshaller.unmarshalFromXml(
                FactModel.class, factModelXml);
        setValueSetCategories(factModel);
        factModel.setXacmlResult(xacmlResult);
        final String result = documentRedactor.redactDocument(c32,
                setRuleExecutionContainer_WrongSensitivity(), factModel, DOCUMENT_TYPE_CCDA_R_2_1_CCD_V_3)
                .getRedactedDocument();
        assertTrue(c32
                .contains("e11275e7-67ae-11db-bd13-0800200c9a66b827vs52h7"));
        assertTrue(c32.contains("d11275e7-67ae-11db-bd13-0800200c9a66"));
        assertTrue(result
                .contains("e11275e7-67ae-11db-bd13-0800200c9a66b827vs52h7"));
        assertTrue(result.contains("d11275e7-67ae-11db-bd13-0800200c9a66"));
    }
@ Test @ Ignore ( "Test must be refactored following the implementation of the new DSS share logic." ) public void testRedactDocument_WrongSensitivityInContainer ( ) throws Exception { initDocumentRedactorWithActualServices ( ) ; final String xacmlResultWithWrongObligations = MOCK_XACML_RESULT . replace ( "<pdpObligation>Drug Abuse</pdpObligation>" , "" ) . replace ( "<pdpObligation>HIV</pdpObligation>" , "" ) ; final XacmlResult xacmlResult = setMockXacmlResult ( xacmlResultWithWrongObligations ) ; String factModelXml = factModelExtractor . extractFactModel ( c32 , xacmlResultWithWrongObligations ) ; c32 = embeddedClinicalDocumentExtractor . extractClinicalDocumentFromFactModel ( factModelXml ) ; factModelXml = removeEmbeddedClinicalDocument ( factModelXml ) ; final FactModel factModel = marshaller . unmarshalFromXml ( FactModel . class , factModelXml ) ; setValueSetCategories ( factModel ) ; factModel . setXacmlResult ( xacmlResult ) ; final String result = documentRedactor . redactDocument ( c32 , setRuleExecutionContainer_WrongSensitivity ( ) , factModel , DOCUMENT_TYPE_CCDA_R_2_1_CCD_V_3 ) . getRedactedDocument ( ) ; assertTrue ( c32 . contains ( "e11275e7-67ae-11db-bd13-0800200c9a66b827vs52h7" ) ) ; assertTrue ( c32 . contains ( "d11275e7-67ae-11db-bd13-0800200c9a66" ) ) ; assertTrue ( result . contains ( "e11275e7-67ae-11db-bd13-0800200c9a66b827vs52h7" ) ) ; assertTrue ( result . contains ( "d11275e7-67ae-11db-bd13-0800200c9a66" ) ) ; }
Sensitivity in container doesn't mean anything anymore.
Sensitivity in container doesn ' t mean anything anymore .
// Arrange // Act // Assert