Add spec for querying messages.