ElementViewImpl implements ElementView<T> { @EventHandler("faAngleRight") public void onFaAngleRightClick(ClickEvent clickEvent) { presenter.onToggleRowExpansion(this, isShown()); clickEvent.stopPropagation(); }  @Override void init(Presenter presenter); @Override void setItemId(String itemId); @Override String getItemId(); @Override LIElement getItemContainer(); @Override UListElement getInnerItemContainer(); @Override LIElement getItemSeparator(); @Override LIElement getSaveChange(); @Override SpanElement getFaAngleRight(); @Override ButtonElement getEditItemButton(); @Override ButtonElement getDeleteItemButton(); @Override boolean isShown(); @Override void toggleRowExpansion(boolean toExpand); @EventHandler("itemContainer") void onItemContainerClick(ClickEvent clickEvent); @EventHandler("innerItemContainer") void onInnerItemContainerClick(ClickEvent clickEvent); @EventHandler("itemSeparator") void onItemSeparatorClick(ClickEvent clickEvent); @EventHandler("faAngleRight") void onFaAngleRightClick(ClickEvent clickEvent); @EventHandler("editItemButton") void onEditItemButtonClick(ClickEvent clickEvent); @EventHandler("deleteItemButton") void onDeleteItemButtonClick(ClickEvent clickEvent); @EventHandler("saveChange") void onSaveChangeClick(ClickEvent clickEvent); @EventHandler("saveChangeButton") void onSaveChangeButtonClick(ClickEvent clickEvent); @EventHandler("cancelChangeButton") void onCancelChangeButton(ClickEvent clickEvent);  }
@Test public void onFaAngleRightClick() { when(faAngleRightMock.getClassName()).thenReturn(FA_ANGLE_RIGHT); elementView.onFaAngleRightClick(clickEventMock); verify(elementPresenterMock, times(1)).onToggleRowExpansion(eq(elementView), eq(false)); verify(clickEventMock, times(1)).stopPropagation(); reset(clickEventMock); reset(elementPresenterMock); when(faAngleRightMock.getClassName()).thenReturn(FA_ANGLE_DOWN); elementView.onFaAngleRightClick(clickEventMock); verify(elementPresenterMock, times(1)).onToggleRowExpansion(eq(elementView), eq(true)); verify(clickEventMock, times(1)).stopPropagation(); }