### Question:
JavaIdentifierUtils { public static String getPackageName(String javaClassName) { List<String> classNameParts = new ArrayList<>(Splitter.on(".").splitToList(javaClassName)); classNameParts.remove(classNameParts.size() - 1); return Joiner.on(".").join(classNameParts); }  static String getJavaClassSimpleName(String javaClassName); static boolean isInnerClass(String javaClassName); static boolean isValidClassName(String className); static int getJavaClassNestingLevel(String javaClassName); static boolean isValidConstantName(String fieldName); static String getPackageName(String javaClassName); static boolean isJavaCoreClass(String javaClassName); static boolean hasSuperclassOrImplementsInterface(Class<?> javaClass, String superJavaClassOrInterfaceName); static Set<String> removeInnerClassesAndInvalidClassNames(Set<String> javaClassNames); static Set<String> javaClassNamesToPackages(Set<String> javaClassNames); static Set<String> removeJavaCoreClassNames(Set<String> javaClassNames);  }### Answer:
@Test public void getPackageName() { assertEquals(JavaIdentifierUtils.getPackageName("Bla"), ""); assertEquals(JavaIdentifierUtils.getPackageName("dummy.Bla"), "dummy"); assertEquals(JavaIdentifierUtils.getPackageName("dummy.bla.Bla"), "dummy.bla"); }