Fix usage of Name service and test case