@Field
    public void setThrowOnEncryptedPayload(boolean throwOnEncryptedPayload) {
        defaultConfig.setThrowOnEncryptedPayload(throwOnEncryptedPayload);
    }
@Test
    public void testThrowOnEncryptedPayload() throws Exception {
        PDFParserConfig pdfParserConfig = new PDFParserConfig();
        pdfParserConfig.setThrowOnEncryptedPayload(true);
        ParseContext parseContext = new ParseContext();
        parseContext.set(PDFParserConfig.class, pdfParserConfig);
        assertThrows(EncryptedDocumentException.class, () -> {
            getRecursiveMetadata("testMicrosoftIRMServices.pdf", parseContext);
        });
    }