### Question:
ClassUtil { public static List<String> getEnclosingNames(String binaryName) { assertNotNull(binaryName); String packageExcludedName = getLastPart(binaryName, '.'); List<String> names = Arrays.asList(packageExcludedName.split("\\$")); if (names.size() <= 1) { return Collections.emptyList(); } return names.subList(0, names.size() - 1); }  static T newInstance(Class<T> clazz); static Constructor<T> getConstructor(Class<T> clazz, Class<?>... parameterTypes); static Method getMethod(Class<T> clazz, String name, Class<?>... parameterTypes); static Method getDeclaredMethod(
      Class<T> clazz, String name, Class<?>... parameterTypes); static Field getDeclaredField(Class<T> clazz, String name); static String getPackageName(String binaryName); static List<String> getEnclosingNames(String binaryName); static String getSimpleName(String binaryName); static Class<?> toBoxedPrimitiveTypeIfPossible(Class<?> clazz); static R traverse(Class<?> clazz, Function<Class<?>, R> f);  }### Answer:
@Test public void testGetEnclosingNames() { List<String> names = ClassUtil.getEnclosingNames("aaa.bbb.Ccc"); assertTrue(names.isEmpty()); }
@Test public void testGetEnclosingNames_noPackage() { List<String> names = ClassUtil.getEnclosingNames("Aaa"); assertTrue(names.isEmpty()); }
@Test public void testGetEnclosingNames_nestedClass() { List<String> names = ClassUtil.getEnclosingNames("aaa.bbb.Ccc$Ddd$Eee"); assertEquals(2, names.size()); assertEquals("Ccc", names.get(0)); assertEquals("Ddd", names.get(1)); }