### Question:
MenuItemSelectionAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.MenuItemSelectionListener { public void itemSelected(org.apache.pivot.wtk.Menu.Item arg0) { if (itemSelected != null) { itemSelected.call(arg0); } }  CallableWithArgs<Void> getItemSelected(); void setItemSelected(CallableWithArgs<Void> itemSelected); void itemSelected(org.apache.pivot.wtk.Menu.Item arg0);  }### Answer:
@Test public void testItemSelected() { final boolean[] invoked = new boolean[1]; CallableWithArgs<Void> callable = new CallableWithArgs<Void>() { public Void call(Object... args) { invoked[0] = true; return null; } }; assertNull(adapter.getItemSelected()); adapter.itemSelected(null); assertFalse(invoked[0]); adapter.setItemSelected(callable); adapter.itemSelected(null); assertTrue(invoked[0]); }