### Question:
ElementAdapter implements GriffonPivotAdapter, org.apache.pivot.wtk.text.ElementListener { public void foregroundColorChanged(org.apache.pivot.wtk.text.Element arg0, java.awt.Color arg1) { if (foregroundColorChanged != null) { foregroundColorChanged.call(arg0, arg1); } }  CallableWithArgs<Void> getNodeInserted(); CallableWithArgs<Void> getNodesRemoved(); CallableWithArgs<Void> getFontChanged(); CallableWithArgs<Void> getForegroundColorChanged(); CallableWithArgs<Void> getBackgroundColorChanged(); CallableWithArgs<Void> getUnderlineChanged(); CallableWithArgs<Void> getStrikethroughChanged(); void setNodeInserted(CallableWithArgs<Void> nodeInserted); void setNodesRemoved(CallableWithArgs<Void> nodesRemoved); void setFontChanged(CallableWithArgs<Void> fontChanged); void setForegroundColorChanged(CallableWithArgs<Void> foregroundColorChanged); void setBackgroundColorChanged(CallableWithArgs<Void> backgroundColorChanged); void setUnderlineChanged(CallableWithArgs<Void> underlineChanged); void setStrikethroughChanged(CallableWithArgs<Void> strikethroughChanged); void nodeInserted(org.apache.pivot.wtk.text.Element arg0, int arg1); void nodesRemoved(org.apache.pivot.wtk.text.Element arg0, int arg1, org.apache.pivot.collections.Sequence<Node> arg2); void fontChanged(org.apache.pivot.wtk.text.Element arg0, java.awt.Font arg1); void foregroundColorChanged(org.apache.pivot.wtk.text.Element arg0, java.awt.Color arg1); void backgroundColorChanged(org.apache.pivot.wtk.text.Element arg0, java.awt.Color arg1); void underlineChanged(org.apache.pivot.wtk.text.Element arg0); void strikethroughChanged(org.apache.pivot.wtk.text.Element arg0);  }### Answer:
@Test public void testForegroundColorChanged() { final boolean[] invoked = new boolean[1]; CallableWithArgs<Void> callable = new CallableWithArgs<Void>() { public Void call(Object... args) { invoked[0] = true; return null; } }; assertNull(adapter.getForegroundColorChanged()); adapter.foregroundColorChanged(null, null); assertFalse(invoked[0]); adapter.setForegroundColorChanged(callable); adapter.foregroundColorChanged(null, null); assertTrue(invoked[0]); }