### Question:
DialogAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.DialogListener { public void modalChanged(org.apache.pivot.wtk.Dialog arg0) { if (modalChanged != null) { modalChanged.call(arg0); } }  CallableWithArgs<Void> getModalChanged(); void setModalChanged(CallableWithArgs<Void> modalChanged); void modalChanged(org.apache.pivot.wtk.Dialog arg0);  }### Answer:
@Test public void testModalChanged() { final boolean[] invoked = new boolean[1]; CallableWithArgs<Void> callable = new CallableWithArgs<Void>() { public Void call(Object... args) { invoked[0] = true; return null; } }; assertNull(adapter.getModalChanged()); adapter.modalChanged(null); assertFalse(invoked[0]); adapter.setModalChanged(callable); adapter.modalChanged(null); assertTrue(invoked[0]); }