@Test
public void testScan() throws NoSuchMethodException, IOException {

  List<Invocation> findUsages = Scanner.findUsages(ScannerTest.class,
          ImmutableSet.of(A.class.getDeclaredMethod("getValue")));
  LOG.debug("Usages: {}", findUsages);
  final ImmutableSet<Method> lookFor = ImmutableSet.of(System.class.getDeclaredMethod("getProperty", String.class),
          System.class.getDeclaredMethod("getProperty", String.class, String.class),
          Integer.class.getDeclaredMethod("getInteger", String.class),
          Integer.class.getDeclaredMethod("getInteger", String.class, int.class),
          Integer.class.getDeclaredMethod("getInteger", String.class, Integer.class),
          Long.class.getDeclaredMethod("getLong", String.class),
          Long.class.getDeclaredMethod("getLong", String.class, Long.class),
          Long.class.getDeclaredMethod("getLong", String.class, long.class),
          Boolean.class.getDeclaredMethod("getBoolean", String.class));
  List<Invocation> findUsages2 = Scanner.findUsages(ScannerTest.class, lookFor);
  LOG.debug("Scan 1 = {}", findUsages2);
  List<Invocation> findUsages3 = Scanner.findUsages(ScannerTest.class.getPackage().getName(), lookFor);
  LOG.debug("Scan 2 = {}", findUsages3);
  Assert.assertThat(findUsages2, CoreMatchers.hasItem(
          Matchers.allOf(
                  Matchers.hasProperty("caleeMethodName",
                          Matchers.equalTo("method")),
                  Matchers.hasProperty("invokedMethod", Matchers.hasProperty("name", Matchers.equalTo("getInteger"))),
                  Matchers.hasProperty("parameters", Matchers.arrayContaining("spf4j.custom.prop2", 1)))));
  Assert.assertThat(findUsages2, CoreMatchers.hasItem(
          Matchers.allOf(
                  Matchers.hasProperty("caleeMethodName",
                          Matchers.equalTo("testSomeMethod")),
                  Matchers.hasProperty("invokedMethod",
                          Matchers.hasProperty("name", Matchers.equalTo("getProperty"))),
                  Matchers.hasProperty("parameters", Matchers.arrayContaining("some.property", "default value")))));
   Assert.assertThat(findUsages2, CoreMatchers.hasItem(
          Matchers.allOf(
                  Matchers.hasProperty("caleeMethodName",
                          Matchers.equalTo("testSomeMethod")),
                  Matchers.hasProperty("invokedMethod", Matchers.hasProperty("name", Matchers.equalTo("getLong"))),
                  Matchers.hasProperty("parameters", Matchers.arrayContaining("someLong.value", 5L)))));
}