private static String approximateSimpleName(Class<?> clazz, boolean dropOuterClassNames) {
    checkArgument(!clazz.isAnonymousClass(), "Attempted to get simple name of anonymous class");
    return approximateSimpleName(clazz.getName(), dropOuterClassNames);
  }
@Test
  public void testDropsOuterClassNamesFalse() {
    assertEquals("Foo.Bar", NameUtils.approximateSimpleName("Foo$1$Bar", false));
    assertEquals("Foo.1", NameUtils.approximateSimpleName("Foo$1", false));
    assertEquals("Foo.2", NameUtils.approximateSimpleName("Foo$1$2", false));
  }