### Question:
WindowStateAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.WindowStateListener { public void windowClosed(org.apache.pivot.wtk.Window arg0, org.apache.pivot.wtk.Display arg1, org.apache.pivot.wtk.Window arg2) { if (windowClosed != null) { windowClosed.call(arg0, arg1, arg2); } }  CallableWithArgs<Vote> getPreviewWindowOpen(); CallableWithArgs<Void> getWindowOpenVetoed(); CallableWithArgs<Vote> getPreviewWindowClose(); CallableWithArgs<Void> getWindowCloseVetoed(); CallableWithArgs<Void> getWindowOpened(); CallableWithArgs<Void> getWindowClosed(); void setPreviewWindowOpen(CallableWithArgs<Vote> previewWindowOpen); void setWindowOpenVetoed(CallableWithArgs<Void> windowOpenVetoed); void setPreviewWindowClose(CallableWithArgs<Vote> previewWindowClose); void setWindowCloseVetoed(CallableWithArgs<Void> windowCloseVetoed); void setWindowOpened(CallableWithArgs<Void> windowOpened); void setWindowClosed(CallableWithArgs<Void> windowClosed); org.apache.pivot.util.Vote previewWindowOpen(org.apache.pivot.wtk.Window arg0); void windowOpenVetoed(org.apache.pivot.wtk.Window arg0, org.apache.pivot.util.Vote arg1); org.apache.pivot.util.Vote previewWindowClose(org.apache.pivot.wtk.Window arg0); void windowCloseVetoed(org.apache.pivot.wtk.Window arg0, org.apache.pivot.util.Vote arg1); void windowOpened(org.apache.pivot.wtk.Window arg0); void windowClosed(org.apache.pivot.wtk.Window arg0, org.apache.pivot.wtk.Display arg1, org.apache.pivot.wtk.Window arg2);  }### Answer:
@Test public void testWindowClosed() { final boolean[] invoked = new boolean[1]; CallableWithArgs<Void> callable = new CallableWithArgs<Void>() { public Void call(Object... args) { invoked[0] = true; return null; } }; assertNull(adapter.getWindowClosed()); adapter.windowClosed(null, null, null); assertFalse(invoked[0]); adapter.setWindowClosed(callable); adapter.windowClosed(null, null, null); assertTrue(invoked[0]); }