- uploadImagePage.processTemplate(request, templateContext);
- }
-
- private Matcher<RedirectException> redirectsTo(final String page) {
- return new TypeSafeDiagnosingMatcher<RedirectException>() {
- @Override
- protected boolean matchesSafely(RedirectException exception, Description mismatchDescription) {
- if (!exception.getTarget().equals(page)) {
- mismatchDescription.appendText("target is ").appendValue(exception.getTarget());
- return false;
- }
- return true;
- }
-
- @Override
- public void describeTo(Description description) {
- description.appendText("target is ").appendValue(page);
- }
- };