TEST: refactor unit tests