[core] refactoring for making the code testeable via interface overaloading