Replace a custom reverse-order comparator with the built-in one.
Constants are camel-case.
Suppress varargs warnings.
Avoid nulls in the nextMessages map.
Package tests correctly.