Implement clearInstanceDependency call and unit test for that