added spec file and defined test examples for existing inject method