ListGroupItemViewImpl implements ListGroupItemView { @EventHandler("faAngleRight") public void onFaAngleRightClick(ClickEvent event) { presenter.onToggleRowExpansion(this, isShown()); }  @Override Widget asWidget(); @Override String getActualClassName(); @EventHandler("listGroupElement") void onFullClassNameClick(ClickEvent event); @EventHandler("faAngleRight") void onFaAngleRightClick(ClickEvent event); @Override void init(Presenter presenter); @Override void setToExpand(boolean toExpand); @Override boolean isToExpand(); @Override void unselect(); @Override void showCheck(boolean show); @Override boolean isCheckShown(); @Override void setFactName(String factName); @Override void setFactNameAndType(String factName, String factType); @Override void setParentPath(String parentPath); @Override String getParentPath(); @Override String getFactName(); @Override String getFactType(); @Override void addFactField(LIElement fieldElement); @Override void addExpandableFactField(DivElement fieldElement); @Override DivElement getListGroupExpansion(); DivElement getListGroupItem(); @Override void closeRow(); @Override void expandRow(); @Override boolean isShown(); @Override void setInstanceAssigned(boolean instanceAssigned); @Override boolean isInstanceAssigned(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final String LIST_VIEW_PF_EXPAND_ACTIVE; }
@Test public void onFaAngleRightClick() { String toReturn = LIST_GROUP_ITEM + " " + LIST_VIEW_PF_EXPAND_ACTIVE; when(listGroupItemHeaderMock.getClassName()).thenReturn(toReturn); listGroupItemViewSpy.onFaAngleRightClick(mock(ClickEvent.class)); verify(listGroupItemPresenterMock, times(1)).onToggleRowExpansion(eq(listGroupItemViewSpy), eq(true)); when(listGroupItemHeaderMock.getClassName()).thenReturn(LIST_GROUP_ITEM); listGroupItemViewSpy.onFaAngleRightClick(mock(ClickEvent.class)); verify(listGroupItemPresenterMock, times(1)).onToggleRowExpansion(eq(listGroupItemViewSpy), eq(false)); }