ListGroupItemViewImpl implements ListGroupItemView { @EventHandler("listGroupElement") public void onFullClassNameClick(ClickEvent event) { if (!listGroupElement.getClassName().contains(ConstantHolder.DISABLED)) { showCheck(true); presenter.onSelectedElement(this); } }  @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 onFullClassNameClick() { when(listGroupElementMock.getClassName()).thenReturn("not-empty disabled"); listGroupItemViewSpy.onFullClassNameClick(mock(ClickEvent.class)); verify(listGroupItemMock, never()).addClassName(eq(ConstantHolder.SELECTED)); verify(listGroupItemPresenterMock, never()).onSelectedElement(eq(listGroupItemViewSpy)); when(listGroupElementMock.getClassName()).thenReturn("empty"); listGroupItemViewSpy.onFullClassNameClick(mock(ClickEvent.class)); verify(listGroupItemMock, times(1)).addClassName(eq(ConstantHolder.SELECTED)); verify(listGroupItemPresenterMock, times(1)).onSelectedElement(eq(listGroupItemViewSpy)); }