@Test
public void testNoExtraction() {

    Metadata m = null;
    //allow nothing
    AccessChecker checker = new AccessChecker(false);
    boolean ex = false;
    try {
        m = getMetadata(false, false);
        checker.check(m);
    } catch (AccessPermissionException e) {
        ex = true;
    }
    assertTrue("correct exception with no extraction, no extract for accessibility", ex);
    ex = false;
    try {
        //document allows extraction for accessibility
        m = getMetadata(false, true);
        checker.check(m);
    } catch (AccessPermissionException e) {
        //but application is not an accessibility application
        ex = true;
    }
    assertTrue("correct exception with no extraction, no extract for accessibility", ex);
}