In reply to shrawan_vaidya:
set_type_override() must be used before calling create(). Typically you do the override from a component at a higher level, like your test if necessary. What most people do is a uvm_config_db::set() in the env or test, and a corresponding uvm_config_db::get() in each agent.