Refactor TestExpectationsParser in preparation for caching the results