@Test
public void testForEachWorkItem() {

    final PortableWorkDefinition workItem1 = getMock("workItem1");
    final PortableWorkDefinition workItem2 = getMock("workItem2");
    final HashMap<String, String> actualWorkItems = new HashMap<>();
    final HashMap<String, String> expectedWorkItems = new HashMap<String, String>() {{
        put("workItem1",
            "workItem1");
        put("workItem2",
            "workItem2");
    }};
    final HashSet<PortableWorkDefinition> fakeDefinitions = new HashSet<PortableWorkDefinition>() {{
        add(workItem1);
        add(workItem2);
    }};
    when(presenter.getWorkItemDefinitions()).thenReturn(fakeDefinitions);
    when(presenter.getModel()).thenReturn(model);
    when(model.getActionCols()).thenReturn(Collections.emptyList());
    plugin.forEachWorkItem(actualWorkItems::put);
    assertEquals(expectedWorkItems,
                 actualWorkItems);
}