Added register method in Stub class