Refactor Main test class to have higher abstraction