@Test
public void listWorkflowDefinitionsFindsExistingAndStoredDefinitionsWithDbType() {

  StoredWorkflowDefinition storedDefinitionNew = mock(StoredWorkflowDefinition.class);
  when(workflowDefinitionDao.queryStoredWorkflowDefinitions(anyCollection())).thenReturn(asList(storedDefinitionNew));
  ListWorkflowDefinitionResponse storedResponseNew = mock(ListWorkflowDefinitionResponse.class, "dbNew");
  when(converter.convert(storedDefinitionNew)).thenReturn(storedResponseNew);
  storedDefinitionNew.type = "new";
  List<ListWorkflowDefinitionResponse> ret = resource.listWorkflowDefinitions(asList("new")).readEntity(definitionListType);
  assertThat(ret, hasItems(storedResponseNew));
}