@Test
public void testCommitHistograms() {

    List<Histogram> messages = Arrays.asList(TestUtils.createHistogram(4), TestUtils.createHistogram(5));
    when(mqService.dequeue(eq(MQService.MQQueue.HISTOGRAM.getQueueName()), eq(Histogram.class), anyInt(), anyInt())).thenReturn(messages);
    assertEquals(2, collectionService.commitHistograms(2, 60000));
}