Support for unit testing.