@Test
public void testExtractOnlyForAccessibility() throws AccessPermissionException {

    Metadata m = getMetadata(false, true);
    //allow accessibility
    AccessChecker checker = new AccessChecker(true);
    checker.check(m);
    assertTrue("no exception", true);
    boolean ex = false;
    try {
        m = getMetadata(false, false);
        checker.check(m);
    } catch (AccessPermissionException e) {
        ex = true;
    }
    assertTrue("correct exception", ex);
}