Added a few missing safeguards in the driver testsuite

I added a shortcur for ``findById`` with the safeguard in the TestCase to make it more readable for tests needing it.