static WebMvcRuntime findWebMvcRuntime() {
    // Find spring-webmvc v3.1 new methods
    try {
      Class.forName("org.springframework.web.method.HandlerMethod");
      return new WebMvc31(); // intentionally doesn't access the type prior to the above guard
    } catch (ClassNotFoundException e) {
      // pre spring-webmvc v3.1
    }

    // compatible with spring-webmvc 2.5
    return new WebMvc25();
  }
@Test void findWebMvcRuntime_HandlerMethod_exists() {
    assertThat(WebMvcRuntime.findWebMvcRuntime())
      .isInstanceOf(WebMvc31.class);
  }