Refactor tests in method classes