### Question:
CardPaneAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.CardPaneListener { public org.apache.pivot.util.Vote previewSelectedIndexChange(org.apache.pivot.wtk.CardPane arg0, int arg1) { if (previewSelectedIndexChange != null) { return previewSelectedIndexChange.call(arg0, arg1); } return Vote.APPROVE; }  CallableWithArgs<Vote> getPreviewSelectedIndexChange(); CallableWithArgs<Void> getSelectedIndexChanged(); CallableWithArgs<Void> getSelectedIndexChangeVetoed(); void setPreviewSelectedIndexChange(CallableWithArgs<Vote> previewSelectedIndexChange); void setSelectedIndexChanged(CallableWithArgs<Void> selectedIndexChanged); void setSelectedIndexChangeVetoed(CallableWithArgs<Void> selectedIndexChangeVetoed); org.apache.pivot.util.Vote previewSelectedIndexChange(org.apache.pivot.wtk.CardPane arg0, int arg1); void selectedIndexChanged(org.apache.pivot.wtk.CardPane arg0, int arg1); void selectedIndexChangeVetoed(org.apache.pivot.wtk.CardPane arg0, org.apache.pivot.util.Vote arg1);  }### Answer:
@Test public void testPreviewSelectedIndexChange() { 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.getPreviewSelectedIndexChange()); adapter.previewSelectedIndexChange(null, 0); assertFalse(invoked[0]); adapter.setPreviewSelectedIndexChange(callable); adapter.previewSelectedIndexChange(null, 0); assertTrue(invoked[0]); }