Extensions methods for unit testing.