Unit tests are refactored