assertFalse(document.isEnforcedReadonlyProtection());
}
@Test
public void testIntegration() throws Exception {
XWPFDocument doc = new XWPFDocument();
XWPFParagraph p1 = doc.createParagraph();
XWPFRun r1 = p1.createRun();
r1.setText("Lorem ipsum dolor sit amet.");
doc.enforceCommentsProtection();
File tempFile = TempFile.createTempFile("documentProtectionFile", ".docx");
FileOutputStream out = new FileOutputStream(tempFile);
doc.write(out);
out.close();
FileInputStream inputStream = new FileInputStream(tempFile);
XWPFDocument document = new XWPFDocument(inputStream);
inputStream.close();
assertTrue(document.isEnforcedCommentsProtection());
}