### Question:
SuggestionPopupStateAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.SuggestionPopupStateListener { public org.apache.pivot.util.Vote previewSuggestionPopupClose(org.apache.pivot.wtk.SuggestionPopup arg0, boolean arg1) { if (previewSuggestionPopupClose != null) { return previewSuggestionPopupClose.call(arg0, arg1); } return Vote.APPROVE; }  CallableWithArgs<Vote> getPreviewSuggestionPopupClose(); CallableWithArgs<Void> getSuggestionPopupCloseVetoed(); CallableWithArgs<Void> getSuggestionPopupClosed(); void setPreviewSuggestionPopupClose(CallableWithArgs<Vote> previewSuggestionPopupClose); void setSuggestionPopupCloseVetoed(CallableWithArgs<Void> suggestionPopupCloseVetoed); void setSuggestionPopupClosed(CallableWithArgs<Void> suggestionPopupClosed); org.apache.pivot.util.Vote previewSuggestionPopupClose(org.apache.pivot.wtk.SuggestionPopup arg0, boolean arg1); void suggestionPopupCloseVetoed(org.apache.pivot.wtk.SuggestionPopup arg0, org.apache.pivot.util.Vote arg1); void suggestionPopupClosed(org.apache.pivot.wtk.SuggestionPopup arg0);  }### Answer:
@Test public void testPreviewSuggestionPopupClose() { final boolean[] invoked = new boolean[1]; CallableWithArgs<org.apache.pivot.util.Vote> callable = new CallableWithArgs<org.apache.pivot.util.Vote>() { public org.apache.pivot.util.Vote call(Object... args) { invoked[0] = true; return null; } }; assertNull(adapter.getPreviewSuggestionPopupClose()); adapter.previewSuggestionPopupClose(null, false); assertFalse(invoked[0]); adapter.setPreviewSuggestionPopupClose(callable); adapter.previewSuggestionPopupClose(null, false); assertTrue(invoked[0]); }