@Test
public void testNestedDeclarationMess() {

  try {
    final File file =
        new File("./src/test/java/org/eclipse/steady/java/test/NestedDeclarations.java");
    final FileAnalyzer fa = FileAnalyzerFactory.buildFileAnalyzer(file);
    final Map<ConstructId, Construct> constructs = fa.getConstructs();
    // The parsing should produce the following 5 elements:
    final JavaPackageId p = new JavaPackageId("org.eclipse.steady.java.test");
    final JavaClassId cl1 =
        JavaId.parseClassQName("org.eclipse.steady.java.test.NestedDeclarations"); // line 5
    final JavaMethodId cl1_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations.doSomething()"); // line 42
    final JavaClassId cl2 =
        JavaId.parseClassQName(
            "org.eclipse.steady.java.test.NestedDeclarations$DoSomethingElse$DoThis"); // line 11
    final JavaMethodId cl2_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$DoSomethingElse$DoThis.doThis()"); // line 13
    final JavaClassId cl3 =
        JavaId.parseClassQName(
            "org.eclipse.steady.java.test.NestedDeclarations$DoSomethingElse$DoThis$1"); // line
    // 16
    final JavaMethodId cl3_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$DoSomethingElse$DoThis$1.doThat()"); // line 17
    final JavaClassId cl4 =
        JavaId.parseClassQName("org.eclipse.steady.java.test.NestedDeclarations$1"); // line 26
    final JavaMethodId cl4_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$1.doSomethingElse()"); // line 27
    final JavaClassId cl5 =
        JavaId.parseClassQName(
            "org.eclipse.steady.java.test.NestedDeclarations$DoThis"); // line 31
    final JavaMethodId cl5_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$DoThis.doThis()"); // line 33
    final JavaClassId cl6 =
        JavaId.parseClassQName(
            "org.eclipse.steady.java.test.NestedDeclarations$DoThis$1"); // line 36
    final JavaMethodId cl6_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$DoThis$1.doThat()"); // line 37
    final JavaClassId cl7 =
        JavaId.parseClassQName("org.eclipse.steady.java.test.NestedDeclarations$2"); // line 45
    final JavaMethodId cl7_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$2.doSomething()"); // line 46
    final JavaClassId cl8 =
        JavaId.parseClassQName(
            "org.eclipse.steady.java.test.NestedDeclarations$1DoThat"); // line 50
    final JavaMethodId cl8_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$1DoThat.doThat()"); // line 52
    final JavaClassId cl9 =
        JavaId.parseClassQName(
            "org.eclipse.steady.java.test.NestedDeclarations$1DoThat$1"); // line 55
    final JavaMethodId cl9_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$1DoThat$1.doThis()"); // line 56
    final JavaEnumId e =
        JavaId.parseEnumQName("org.eclipse.steady.java.test.NestedDeclarations$Foo"); // line 62
    final JavaMethodId e_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$Foo.bar()"); // line 64
    final JavaClassId cl10 =
        JavaId.parseClassQName(
            "org.eclipse.steady.java.test.NestedDeclarations$Foo$1DoThis"); // line 66
    final JavaMethodId cl10_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$Foo$1DoThis.doThis()"); // line 68
    final JavaClassId cl11 =
        JavaId.parseClassQName(
            "org.eclipse.steady.java.test.NestedDeclarations$Foo$1DoThis$1"); // line 71
    final JavaMethodId cl11_m =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.NestedDeclarations$Foo$1DoThis$1.doThat()"); // line 72
    // Assertions
    assertEquals(25, constructs.size());
    assertTrue(constructs.containsKey(p));
    assertTrue(constructs.containsKey(cl1));
    assertTrue(constructs.containsKey(cl1_m));
    assertTrue(constructs.containsKey(cl2));
    assertTrue(constructs.containsKey(cl2_m));
    assertTrue(constructs.containsKey(cl3));
    assertTrue(constructs.containsKey(cl3_m));
    assertTrue(constructs.containsKey(cl4));
    assertTrue(constructs.containsKey(cl4_m));
    assertTrue(constructs.containsKey(cl5));
    assertTrue(constructs.containsKey(cl5_m));
    assertTrue(constructs.containsKey(cl6));
    assertTrue(constructs.containsKey(cl6_m));
    assertTrue(constructs.containsKey(cl7));
    assertTrue(constructs.containsKey(cl7_m));
    assertTrue(constructs.containsKey(cl8));
    assertTrue(constructs.containsKey(cl8_m));
    assertTrue(constructs.containsKey(cl9));
    assertTrue(constructs.containsKey(cl9_m));
    assertTrue(constructs.containsKey(e));
    assertTrue(constructs.containsKey(e_m));
    assertTrue(constructs.containsKey(cl10));
    assertTrue(constructs.containsKey(cl10_m));
    assertTrue(constructs.containsKey(cl11));
    assertTrue(constructs.containsKey(cl11_m));
  } catch (FileAnalysisException e) {
    System.err.println(e.getMessage());
    assertTrue(false);
  }
}