@Test
public void listWorkflowDefinitionsFindsExistingAndStoredDefinitionsWithoutArguments() {

  StoredWorkflowDefinition storedDefinitionDummy = mock(StoredWorkflowDefinition.class);
  StoredWorkflowDefinition storedDefinitionNew = mock(StoredWorkflowDefinition.class);
  when(workflowDefinitionDao.queryStoredWorkflowDefinitions(anyCollection())).thenReturn(asList(storedDefinitionDummy, storedDefinitionNew));
  ListWorkflowDefinitionResponse storedResponseDummy = mock(ListWorkflowDefinitionResponse.class, "dbDummy");
  ListWorkflowDefinitionResponse storedResponseNew = mock(ListWorkflowDefinitionResponse.class, "dbNew");
  storedDefinitionDummy.type = "dummy";
  when(converter.convert(storedDefinitionNew)).thenReturn(storedResponseNew);
  storedDefinitionNew.type = "new";
  Collection<ListWorkflowDefinitionResponse> ret = resource.listWorkflowDefinitions(emptyList()).readEntity(definitionListType);
  assertThat(ret, hasItems(storedResponseNew, dummyResponse));
  assertThat(ret, not(hasItem(storedResponseDummy)));
}