assertNull("Don't know anything about this path", chain);
}
public void testSatisfiedBeanPropertyDependencyWithAutowireByType() throws Exception {
String path = "/BeanProperty.htm";
StaticWebApplicationContext wac = new StaticWebApplicationContext();
wac.registerSingleton("test", TestBean.class, new MutablePropertyValues());
HashUrlMapHandlerMapping hm = new HashUrlMapHandlerMapping();
hm.setAutowireMode(AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE);
hm.register(BeanPropertyController.class, new PathMap(path));
hm.setApplicationContext(wac);
BeanPropertyController bpc = (BeanPropertyController) wac.getBean(BeanPropertyController.class.getName());
assertSame(wac.getBean("test"), bpc.testBean);
HandlerExecutionChain chain = hm.getHandler(new MockHttpServletRequest("GET", path));
assertNotNull(chain);
assertEquals("Path is mapped correctly based on attribute", bpc, chain.getHandler());
chain = hm.getHandler(new MockHttpServletRequest("GET", "completeRubbish.html"));
assertNull("Don't know anything about this path", chain);