In reply to rajashekar.merugu:
I was able to regenerate your error only when I put env as class which I have not defined.
please check with your class name.
Also update your constructor with parent argument in test and check if env is registered with factory.