Some time ago the test scripts of OTOBO were converted to standalone scripts. The most important change is that Dev::UnitTest;;Run no longer magically sets up $Self. This means that test scripts that wants to use Dev::UnitTest::Run must be adapted. Apparently the CodePolicy test scripts fall into that category and they must be adapted.
It also would be nice to have, that the tests can be run without installing the CodePolicy into an OTOBO installation.