@Test
void putEvents_largeBatch() {

    final HBaseStatisticsConfig hBaseStatisticsConfig = new HBaseStatisticsConfig();
    hBaseStatisticsConfig.setDocRefType(DOC_REF_TYPE_1);
    hBaseStatisticsConfig.getKafkaTopicsConfig().setCount("MyTopic");
    hBaseStatisticsConfig.setEventsPerMessage(10);
    initMocks();
    StroomStatsInternalStatisticsService stroomStatsInternalStatisticsService =
            new StroomStatsInternalStatisticsService(
                    mockStroomKafkaProducerFactory,
                    hBaseStatisticsConfig
            );
    //assemble test data
    DocRef docRefA = new DocRef(DOC_REF_TYPE_1, UUID.randomUUID().toString(), "myStat1");
    DocRef docRefB = new DocRef(DOC_REF_TYPE_2, UUID.randomUUID().toString(), "myStat2");
    Map<DocRef, List<InternalStatisticEvent>> map = Map.of(
            docRefA, createNEvents(InternalStatisticKey.MEMORY, 100),
            docRefB, createNEvents(InternalStatisticKey.CPU, 15));
    stroomStatsInternalStatisticsService.putEvents(map);
    //two different doc refs and batch size of 10,
    //so kafka msg count is 10 for A and 2 for B, thus 12
    Mockito.verify(mockKafkaProducer, Mockito.times(12))
            .send(Mockito.any(ProducerRecord.class));
}