DocumentMaskerImpl implements DocumentMasker { @Override public String maskDocument(String document, Key deSedeMaskKey, RuleExecutionContainer ruleExecutionContainer, XacmlResult xacmlResult) { Document xmlDocument = null; String xmlString = null; try { xmlDocument = documentXmlConverter.loadDocument(document); xmlString = documentXmlConverter.convertXmlDocToString(xmlDocument); } catch (final Exception e) { logger.error(e.getMessage(), e); throw new DS4PException(e.toString(), e); } return xmlString; } DocumentMaskerImpl(DocumentXmlConverter documentXmlConverter); @Override String maskDocument(String document, Key deSedeMaskKey,
			RuleExecutionContainer ruleExecutionContainer,
			XacmlResult xacmlResult);  }
@Test public void testMaskElement() { logger.debug(c32); String s = null; try { s = documentMasker.maskDocument(c32, EncryptTool.generateKeyEncryptionKey(), ruleExecutionContainer, xacmlResultMock); logger.debug(s); } catch (Exception e) { logger.error(e.getMessage(), e); } assertNotNull(s); }
@Test(expected = DS4PException.class) public void testMaskElement_Throws_DS4PException() throws Exception { @SuppressWarnings("unused") String s = documentMasker.maskDocument("", EncryptTool.generateKeyEncryptionKey(), ruleExecutionContainer, xacmlResultMock); }