FormStylePopup extends BaseModal { public FormStyleItem addAttributeWithHelp(final String attributeName, final String helpTitle, final String helpContent, final Widget widget) { FormStyleItem formStyleItem = form.addAttribute(attributeName, helpTitle, helpContent, widget); setAttributeVisibility(formStyleItem.getIndex(), true); return formStyleItem; } FormStylePopup(final String title);  FormStylePopup(final Image icon,
                          final String title); void clear(); FormStyleItem addAttribute(final String label,
                                      final IsWidget wid); FormStyleItem addAttribute(final String label,
                                      final IsWidget wid,
                                      final boolean visible); FormStyleItem addAttributeWithHelp(final String attributeName,
                                              final String helpTitle,
                                              final String helpContent,
                                              final Widget widget); int addRow(final IsWidget wid); void setAttributeVisibility(final int index,
                                       final boolean b);  }
@Test public void testAddAttributeWithHelp() throws Exception { final String attribute = "form attribute"; final String helpTitle = "help title"; final String helpContent = "help content"; final Widget widget = mock(Widget.class); final FormStyleItem expectedItem = mock(FormStyleItem.class); final int expectedAttributeIndex = 123; doReturn(expectedItem).when(formStyleLayout).addAttribute(attribute, helpTitle, helpContent, widget); doReturn(expectedAttributeIndex).when(expectedItem).getIndex(); testedPopup.addAttributeWithHelp(attribute, helpTitle, helpContent, widget); verify(formStyleLayout).addAttribute(attribute, helpTitle, helpContent, widget); verify(formStyleLayout).setAttributeVisibility(expectedAttributeIndex, true); }