Brokeout helper methods into own class for reuse in unit tests.