Refactoring, move test method to end of file