Stub generator for testing dependency injection.