+ protected void verifyRedirect(String target) throws RedirectException {
+ expectedException.expect(redirectsTo(target));
+ getPage().handleRequest(freenetRequest, templateContext);
+ }
+
+ protected void verifyRedirect(String target, Runnable verification) throws RedirectException {
+ expectedException.expect(redirectsTo(target));
+ try {
+ getPage().handleRequest(freenetRequest, templateContext);
+ fail();
+ } finally {
+ verification.run();
+ }
+ }
+