@Test public void should_able_to_handle_default_path() { resolver.init(servletConfig); Class<?> controllerForArticleClass = resolver.getControllerFor("/demo/article"); assertThat(controllerForArticleClass == TestPathAnnotationController.class, is(true)); }
@Test public void should_able_to_resolve_the_controller_mapping_based_on_annotation() { resolver.init(servletConfig); Class<?> controllerForArticleClass = resolver.getControllerFor("/demo/article/create"); assertThat(controllerForArticleClass == TestPathAnnotationController.class, is(true)); }