Fix compilation issues in tests causes by refactoring

Fix compilation issues in tests causes by refactoring