@Test
public void messageGroupIdShouldBeBetween0AndCacheSize() {

    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);
        assertTrue("Message group id should be between 0 and cache size " + this.messageGroupCacheSize,
                actual >= 0 && actual < this.messageGroupCacheSize);
    }
}