else
{
encryptedDoc = PDDocument.load(pdfFile);
Assert.assertTrue(encryptedDoc.isEncrypted());
DecryptionMaterial decryptionMaterial = new StandardDecryptionMaterial(userpassword);
encryptedDoc.openProtection(decryptionMaterial);
}
Assert.assertFalse(encryptedDoc.getCurrentAccessPermission().isOwnerPermission());
assertEquals(permission.getPermissionBytes(), encryptedDoc.getCurrentAccessPermission().getPermissionBytes());