@Test
public void shouldRegisterClasses() throws Exception {

	runInADifferentClassLoader(new Callable<Void>() {
		public Void call() throws Exception {
			URL url = File.createTempFile("vraptor", "test").getParentFile().toURI().toURL();
			when(resolver.findWebInfClassesLocation()).thenReturn(url);
			Collection<String> components = asList(ResourceA.class.getName(), ResourceB.class.getName());
			Class<WebAppBootstrap> generated = generator.generate(components, resolver);
			WebAppBootstrap instance = generated.newInstance();
			instance.configure(registry);
			verify(registry).deepRegister(ResourceA.class);
			verify(registry).deepRegister(ResourceB.class);
			return null;
		}
	});
}