}
return status;
}
}).get(2000, TimeUnit.MILLISECONDS);
HomeController metaData = new HomeController();
metaData.setApplicationContext(context);
metaData.afterPropertiesSet();
MockHttpServletRequest request = new MockHttpServletRequest();
ModelMap model = new ModelMap();
metaData.getResources(request, model);
@SuppressWarnings("unchecked")
List<ResourceInfo> resources = (List<ResourceInfo>) model.get("resources");
StringBuilder content = new StringBuilder();
for (ResourceInfo resourceInfo : resources) {
content.append(resourceInfo.getMethod() + resourceInfo.getUrl() + "=\n");
}
FileUtils.writeStringToFile(new File("target/resources.properties"), content.toString());
HomeController home = context.getBean(HomeController.class);
// System.err.println(home.getUrlPatterns());
assertTrue(home.getUrlPatterns().contains("/jobs/{jobName}"));
String message = context.getMessage("GET/jobs/{jobName}", new Object[0], Locale.getDefault());
assertTrue("No message for /jobs/{jobName}", StringUtils.hasText(message));
child.close();