refactoring redundant test methods