@Test
public void testClassWithoutPackage() {

  try {
    final JavaFileAnalyzer2 jfa =
        (JavaFileAnalyzer2)
            FileAnalyzerFactory.buildFileAnalyzer(
                new File("./src/test/java/ClassWithoutPackage.java"));
    final Map<ConstructId, Construct> constructs_from_java = jfa.getConstructs();
    final ClassFileAnalyzer cfa =
        (ClassFileAnalyzer)
            FileAnalyzerFactory.buildFileAnalyzer(
                new File("./target/test-classes/ClassWithoutPackage.class"));
    final Map<ConstructId, Construct> constructs_from_class = cfa.getConstructs();
    // The parsing should produce the following 3 elements:
    final JavaClassId cl = JavaId.parseClassQName("ClassWithoutPackage");
    final JavaConstructorId co = JavaId.parseConstructorQName("ClassWithoutPackage()");
    final JavaMethodId m = JavaId.parseMethodQName("ClassWithoutPackage.foo()");
    // Assertions
    assertEquals(3, constructs_from_java.size());
    assertTrue(constructs_from_java.containsKey(cl));
    assertTrue(constructs_from_java.containsKey(co));
    assertTrue(constructs_from_java.containsKey(m));
    assertEquals(3, constructs_from_class.size());
    assertTrue(constructs_from_class.containsKey(cl));
    assertTrue(constructs_from_java.containsKey(co));
    assertTrue(constructs_from_class.containsKey(m));
  } catch (FileAnalysisException e) {
    e.printStackTrace();
    assertTrue(false);
  }
}