### Question:
NodeSelectionTrigger implements Closure { @Override public void execute(InteractiveGraphicsElement polygon) { cascade.addToggleListener(listener); polygon.toggle(); cascade.removeToggleListener(listener); } NodeSelectionTrigger(Cascade cascade, NodeInteractionListener interactionListener); @Override void execute(InteractiveGraphicsElement polygon);  }### Answer:
@Test public void triggersSelectionOfIdOnListener() throws Exception { trigger.execute(polygon); verify(listener).nodeSelected("X"); }
@Test public void breaksUpConnectionToPolygonOnceTaskIsDone() throws Exception { trigger.execute(polygon); polygon.toggle(); verify(listener, times(1)).nodeSelected("X"); }