testRewrite(getMethod(cls, "testSingleAction", NamespaceId.class), rewrittenObject,
ExceptionAuthorizationEnforcer.ExpectedException.class, NamespaceId.DEFAULT);
testRewrite(getMethod(cls, "testMultipleAction", NamespaceId.class), rewrittenObject,
ExceptionAuthorizationEnforcer.ExpectedException.class, NamespaceId.DEFAULT);
testRewrite(getMethod(cls, "testNoAuthEnforceAnnotation", NamespaceId.class), rewrittenObject,
DummyAuthEnforce.EnforceNotCalledException.class, NamespaceId.DEFAULT);
testRewrite(getMethod(cls, "testMethodWithoutException", NamespaceId.class), rewrittenObject,
ExceptionAuthorizationEnforcer.ExpectedException.class, NamespaceId.DEFAULT);
testRewrite(getMethod(cls, "testNameAnnotationPref", NamespaceId.class, String.class), rewrittenObject,
NamespaceId.DEFAULT, ExceptionAuthorizationEnforcer.ExpectedException.class,
NamespaceId.DEFAULT, "dataset");
testRewrite(getMethod(cls, "testMultipleParts", String.class, String.class), rewrittenObject,
new DatasetId("ns", "dataset"),
ExceptionAuthorizationEnforcer.ExpectedException.class, "ns", "dataset");
testRewrite(getMethod(cls, "testQueryPathParamAnnotations", String.class, String.class), rewrittenObject,
new DatasetId("ns", "dataset"),
ExceptionAuthorizationEnforcer.ExpectedException.class, "ns", "dataset");
testRewrite(getMethod(cls, "testMultipleAnnotationsPref", NamespaceId.class), rewrittenObject,
ExceptionAuthorizationEnforcer.ExpectedException.class, NamespaceId.DEFAULT);
rewrittenObject = loadRewritten(classLoader, DummyAuthEnforce.class.getName(), cls.getName());
invokeSetters(cls, rewrittenObject);