ensured that OiotClient operations use the locking mechanism and added associated tests