@Test public void test_canRemoveFormItemClickHandlerWithHandlerRegistration() { final FormItemClickHandler handler = mock(FormItemClickHandler.class); final HandlerRegistration registration = formItemIcon.addFormItemClickHandler(handler); registration.removeHandler(); assertFalse(formItemIcon.getFormItemClickHandlers().contains(handler)); }
@Test public void test_canAddFormItemIconClickHandler() { final FormItemClickHandler handler = mock(FormItemClickHandler.class); formItemIcon.addFormItemClickHandler(handler); assertTrue(formItemIcon.getFormItemClickHandlers().contains(handler)); }