I don't know how it works for you, but for me it fails:
> incompatible types: List<Object> cannot be converted to Collection<? extends Message<?>>
                return new SimpleMessageGroup((Collection<? extends Message<?>>) allMessages, groupId);