Refactoring tests
Fixed tests