Convert { public static String packagePart(String fullName) { int lastDot = fullName.lastIndexOf('.'); return lastDot < 0 ? "" : fullName.substring(0, lastDot); } private  Convert(); static String packagePart(String fullName); static String shortName(String fullName); static String flatName(String bytecodeName); static String bytecodeName(String fullName); static String enclosingClassName(String shortName); static String innerClassName(String enclosingClassName, String shortName); static String fullName(String packagePart, String className);  }
@Test void packagePart() { assertThat(Convert.packagePart("org")).isEmpty(); assertThat(Convert.packagePart("org.example")).isEqualTo("org"); }