[build] Fixed failing tests.
- Also replaced util deprecate methods usage.