@Test
void convertFromPolicyElement() throws IOException {

    doAnswer(invocation -> {
        IOUtils.write("out", invocation.getArgument(1), StandardCharsets.UTF_8);
        ((OutputStream) invocation.getArgument(1)).close();
        return null;
    }).when(documentFileUtils).printXML(nullable(Element.class), any(OutputStream.class), any(Boolean.class));
    InputStream xmlStream = xmlPolicyConverter.convertFromPolicyElement(null);
    String xmlString = IOUtils.toString(xmlStream, StandardCharsets.UTF_8);
    assertEquals("out", xmlString);
}