### Question:
CodeBaseScanner { void findMethods(CodeBase codeBase, Class<?> clazz, List<String> packages) { logger.log(finest, "Analyzing " + clazz); try { Method[] declaredMethods = clazz.getDeclaredMethods(); for (Method method : declaredMethods) { boolean ignored = true; MethodSignature3 signature = SignatureUtils.makeMethodSignature(clazz, method); if (signature == null) { logger.log(finest, "Ignoring method " + method + ", cannot make AspectJ signature"); } else { String declaringPackage = method.getDeclaringClass().getPackage().getName(); for (String pkg : packages) { if (declaringPackage.startsWith(pkg)) { codeBase.addSignature(signature); ignored = false; } } } if (ignored) { logger.log(finest, "Ignored " + signature); } } for (Class<?> innerClass : clazz.getDeclaredClasses()) { findMethods(codeBase, innerClass, packages); } } catch (NoClassDefFoundError e) { logger.warning(String.format("Cannot analyze %s: %s", clazz, e.toString())); } }  int scanSignatures(CodeBase codeBase);  }### Answer:
@Test public void should_find_base_methods_of_ScannerTestIf() { scanner.findMethods( codeBase, ScannerTestIf.class, codeBase.getConfig().getNormalizedPackages()); assertThat(codeBase.getSignatures().size(), is(2)); }
@Test public void should_find_base_methods_of_ScannerTest1() { scanner.findMethods(codeBase, ScannerTest1.class, codeBase.getConfig().getNormalizedPackages()); assertThat(codeBase.getSignatures().size(), is(2)); }
@Test public void should_find_base_methods_of_ScannerTest2() { scanner.findMethods(codeBase, ScannerTest2.class, codeBase.getConfig().getNormalizedPackages()); assertThat(codeBase.getSignatures().size(), is(2)); }
@Test public void should_find_base_methods_of_ScannerTest3() { scanner.findMethods(codeBase, ScannerTest3.class, codeBase.getConfig().getNormalizedPackages()); assertThat(codeBase.getSignatures().size(), is(1)); }
@Test public void should_find_base_methods_of_ScannerTest4() { scanner.findMethods(codeBase, ScannerTest4.class, codeBase.getConfig().getNormalizedPackages()); assertThat(codeBase.getSignatures().size(), is(11)); }