@Test
public void shouldScanBasePackages() {

	ClassLoader classLoader = new URLClassLoader(new URL[] {ScannotationComponentScannerTest.class.getResource("/test-fixture.jar")});
	when(classPathResolver.findBasePackages()).thenReturn(Arrays.asList("br.com.caelum.vraptor.ioc"));
	when(classPathResolver.getClassLoader()).thenReturn(classLoader);
	when(classPathResolver.findWebInfClassesLocation()).thenReturn(classLoader.getResource("br/com/caelum/vraptor/test/"));
	ScannotationComponentScanner scanner = new ScannotationComponentScanner();
	Collection<String> classes = scanner.scan(classPathResolver);
	assertThat(classes, hasItem(ResourceInTheClasspath.class.getName()));
}