@Test
public void testNamedClassInInterfaceAndAnonClassInConstructor() {

  try {
    final JavaFileAnalyzer2 jfa =
        (JavaFileAnalyzer2)
            FileAnalyzerFactory.buildFileAnalyzer(
                new File(
                    "./src/test/java/org/eclipse/steady/java/test/HttpRequestCompletionLog.java"));
    final Map<ConstructId, Construct> constructs = jfa.getConstructs();
    // The parsing should produce the following 5 elements:
    final JavaPackageId p = new JavaPackageId("org.eclipse.steady.java.test");
    // Named inner class
    final JavaClassId named_class =
        JavaId.parseClassQName("org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder");
    final JavaConstructorId named_class_cons =
        JavaId.parseConstructorQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder(String,String)");
    final JavaMethodId named_class_m1 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder.forTarget(String,String)");
    final JavaMethodId named_class_m2 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder.withStartTimeInMillis(long)");
    final JavaMethodId named_class_m3 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder.withDurationInMillis(long)");
    final JavaMethodId named_class_m4 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder.withRequestEntitySizeInBytes(long)");
    final JavaMethodId named_class_m5 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder.withResponseEntitySizeInBytes(long)");
    final JavaMethodId named_class_m6 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder.withResponseStatus(int)");
    final JavaMethodId named_class_m7 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder.withResponseReasonPhrase(String)");
    final JavaMethodId named_class_m8 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder.withResponseContentType(String)");
    final JavaMethodId named_class_m9 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder.build()");
    // Anon. class
    final JavaClassId anon_class =
        JavaId.parseClassQName("org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1");
    final JavaMethodId anon_class_m1 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1.toString()");
    final JavaMethodId anon_class_m2 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1.getDestination()");
    final JavaMethodId anon_class_m3 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1.getTargetPath()");
    final JavaMethodId anon_class_m4 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1.getStartTimeInMillis()");
    final JavaMethodId anon_class_m5 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1.getDurationInMillis()");
    final JavaMethodId anon_class_m6 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1.getRequestEntitySizeInBytes()");
    final JavaMethodId anon_class_m7 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1.getResponseEntitySizeInBytes()");
    final JavaMethodId anon_class_m8 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1.getResponseStatus()");
    final JavaMethodId anon_class_m9 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1.getResponseReasonPhrase()");
    final JavaMethodId anon_class_m10 =
        JavaId.parseMethodQName(
            "org.eclipse.steady.java.test.HttpRequestCompletionLog$Builder$1.getResponseContentType()");
    // Assertions
    assertEquals(23, constructs.size());
    assertTrue(constructs.containsKey(p));
    assertTrue(constructs.containsKey(named_class));
    assertTrue(constructs.containsKey(named_class_cons));
    assertTrue(constructs.containsKey(named_class_m1));
    assertTrue(constructs.containsKey(named_class_m2));
    assertTrue(constructs.containsKey(named_class_m3));
    assertTrue(constructs.containsKey(named_class_m4));
    assertTrue(constructs.containsKey(named_class_m5));
    assertTrue(constructs.containsKey(named_class_m6));
    assertTrue(constructs.containsKey(named_class_m7));
    assertTrue(constructs.containsKey(named_class_m8));
    assertTrue(constructs.containsKey(named_class_m9));
    assertTrue(constructs.containsKey(anon_class));
    assertTrue(constructs.containsKey(anon_class_m1));
    assertTrue(constructs.containsKey(anon_class_m2));
    assertTrue(constructs.containsKey(anon_class_m3));
    assertTrue(constructs.containsKey(anon_class_m4));
    assertTrue(constructs.containsKey(anon_class_m5));
    assertTrue(constructs.containsKey(anon_class_m6));
    assertTrue(constructs.containsKey(anon_class_m7));
    assertTrue(constructs.containsKey(anon_class_m8));
    assertTrue(constructs.containsKey(anon_class_m9));
    assertTrue(constructs.containsKey(anon_class_m10));
  } catch (FileAnalysisException e) {
    e.printStackTrace();
    assertTrue(false);
  }
}