/**
* Assert the selected view name with the given Hamcrest {@link Matcher}.
*/
public ResultMatcher name(final Matcher<? super String> matcher) {
return new ResultMatcher() {
@Override
public void match(MvcResult result) throws Exception {
ModelAndView mav = result.getModelAndView();
assertTrue("No ModelAndView found", mav != null);
assertThat("View name", mav.getViewName(), matcher);