Some refactoring for future tests