@Test
public void testAddItem() throws Exception {

    final String parentId = "uuid";
    final GuidedDecisionTableAccordionItem item = mock(GuidedDecisionTableAccordionItem.class);
    final GuidedDecisionTableAccordionItem.Type type = GuidedDecisionTableAccordionItem.Type.CONDITION;
    final Widget widget = mock(Widget.class);
    final List<GuidedDecisionTableAccordionItem> itemsList = spy(new ArrayList<>());
    when(accordion.blankAccordionItem()).thenReturn(item);
    when(accordion.getItems()).thenReturn(itemsList);
    when(accordion.getParentId()).thenReturn(parentId);
    accordion.addItem(type, widget);
    verify(view).addItem(item);
    verify(itemsList).add(item);
    verify(item).init(parentId, type, widget);
}