Can you move this into a more general helper so it can be used by other tests when needed.