Would it be worth returning the `messages` instance from this method so that a test could use it?