test: fix three tests to work under bullseye

This patch introduces couple of fixes in our unit tests, which makes the code compile and pass tests when using bullseye code coverage tool.