### Question:
ClassDumper { static String enclosingClassName(String className) { int lastDollarIndex = className.lastIndexOf('$'); if (lastDollarIndex < 0) { return null; } return className.substring(0, lastDollarIndex); } private  ClassDumper(
      List<ClassPathEntry> inputClassPath,
      ClassLoader extensionClassLoader,
      Map<String, ClassPathEntry> fileNameToClassPathEntry);   }### Answer:
@Test public void testEnclosingClassNames() { String actualName = ClassDumper.enclosingClassName("com.google.Foo$Bar$Baz"); Truth.assertThat(actualName).isEqualTo("com.google.Foo$Bar"); String topLevelClass = ClassDumper.enclosingClassName("com.google.Foo"); Truth.assertThat(topLevelClass).isNull(); }