@Test
public void testFindWorkItemDefinition() {

    final PortableWorkDefinition workItem1 = getMock("workItem1");
    final PortableWorkDefinition workItem2 = getMock("workItem2");
    final HashSet<PortableWorkDefinition> fakeDefinitions = new HashSet<PortableWorkDefinition>() {{
        add(workItem1);
        add(workItem2);
    }};
    when(presenter.getWorkItemDefinitions()).thenReturn(fakeDefinitions);
    final PortableWorkDefinition workItem = plugin.findWorkItemDefinition("workItem1");
    assertEquals(workItem1,
                 workItem);
}