### Question:
PackageListBox implements IsElement { public void onPackageSelected(final String selectedPackage) { setSelectedPackage(resolve(selectedPackage)); } @Inject  PackageListBox(final PackageListBoxView view,
                          final WorkspaceProjectContext projectContext,
                          final Caller<KieModuleService> moduleService); void setUp(final boolean includeDefaultPackage); void setUp(final boolean includeDefaultPackage,
                      final Command packagesLoadedCommand); void clearSelectElement(); Package getSelectedPackage(); @Override HTMLElement getElement(); void onPackageSelected(final String selectedPackage);  }### Answer:
@Test public void testOnPackageSelected() { final Package pkg = new Package(); doReturn(pkg).when(moduleService).resolvePackage(any(Module.class), eq("com.myteam")); packageListBox.onPackageSelected("com.myteam"); assertEquals(pkg, packageListBox.getSelectedPackage()); }