### Question:
SpoonCodeInstrument extends JfxInstrument implements Initializable { String getUnqualifiedClassName(final String qname) { final String[] parts = qname.split("\\."); return parts[parts.length - 1]; }  @Override void initialize(final URL url, final ResourceBundle res);  }### Answer:
@Test void getUnqualifiedClassNameWithPkg() { final String name = spoonCodeInstrument.getUnqualifiedClassName("foo.bar.foobar.ClassName"); assertThat(name).isEqualTo("ClassName"); }
@Test void getUnqualifiedClassNameWithoutPkg() { final String name = spoonCodeInstrument.getUnqualifiedClassName("CtClass"); assertThat(name).isEqualTo("CtClass"); }