@Test
public void testMessageGroupIdShouldBeBetween0AndCacheSize() {

    for (int i = 0; i < 10000; i++) {
        final String uuid = UUID.randomUUID().toString();
        final String messageGroupId = this.messageSender.getMessageGroupId(uuid);
        final int actual = Integer.valueOf(messageGroupId);
        assertThat(actual >= 0 && actual < this.messageGroupCacheSize)
                .as("Message group id should be between 0 and cache size " + this.messageGroupCacheSize).isTrue();
    }
}