Driver authors should use the driver_test_realm for integration tests.
Drivers authors should use the driver testing library library for unit tests.
There are a number of helpful mock libraries: