Added the ability to inherit the HK2 annotation and also added test cases for it.