[WO-429] minor refactoring to fix the tests