Extracted common test stuff into separate class