Configuration Reflections to scan test classes
<p>Using <a href="https://github.com/ronmamo/reflections" rel="nofollow noreferrer">Reflections</a> library, I wrote a simple utility class that indexes all test methods together with their annotations. Reflections library helps me like that:</p>

<pre><code>Reflections reflections = new Reflections(new ConfigurationBuilder()
  .setUrls(ClasspathHelper.forPackage(packageToIndex))
  .filterInputsBy(new FilterBuilder().includePackage(packageToIndex))
  .setScanners(
    new SubTypesScanner(false),
    new TypeAnnotationsScanner(),
    new MethodAnnotationsScanner()));

Set testMethods = reflections.getMethodsAnnotatedWith(Test.class);
</code></pre>

<p>If my utility class is located in sources root (<code>src/main/java</code>), it finds all test methods as expected.</p>

<p>However, if it is located in test root (<code>src/test/java</code>), then it finds no test methods.</p>

<p>How should I define ConfigurationBuilder for Reflections so that it works for the latter case?</p>