Hash: refactor unit tests