@Test
public void getWorkflowDefinitionStatisticsDelegatesToStatisticsService() {

  Map<String, Map<String, WorkflowDefinitionStatistics>> statsMap = emptyMap();
  when(service.getWorkflowDefinitionStatistics("dummy", createdAfter, createdBefore, modifiedAfter, modifiedBefore)).thenReturn(statsMap);
  when(converter.convert(statsMap)).thenReturn(new WorkflowDefinitionStatisticsResponse());
  WorkflowDefinitionStatisticsResponse statistics = resource.getStatistics("dummy", createdAfter, createdBefore, modifiedAfter, modifiedBefore)
      .readEntity(WorkflowDefinitionStatisticsResponse.class);
  verify(service).getWorkflowDefinitionStatistics("dummy", createdAfter, createdBefore, modifiedAfter, modifiedBefore);
  assertThat(statistics.stateStatistics.size(), is(0));
}