ServiceTools { public String getInstanceNameFromDataservice(Class cls) { DataService dataService = (DataService) cls.getAnnotation(DataService.class); String clsName = dataService.name(); if (clsName.isEmpty()) { clsName = cls.getSimpleName(); } return getInstanceName(clsName); }  String getShortName(String fullformat); String getLiteralType(Type type); IJsonMarshaller getJsonMarshaller(Annotation[] annotations); IJsonMarshaller getJsonMarshallerFromAnnotation(JsonUnmarshaller jua); String getTemplateOfType(Type type, IJsonMarshaller jsonMarshaller); String getInstanceNameFromDataservice(Class cls); boolean isConsiderateMethod(Method method);  }
@Test public void testGetInstanceNameFromDataservice() { System.out.println("getInstanceNameFromDataservice"); String result = instance.getInstanceNameFromDataservice(DataService1.class); assertThat(result).isEqualTo("dataService1"); }
@Test public void testGetInstanceNameFromDataserviceWithName() { System.out.println("getInstanceNameFromDataservice"); String result = instance.getInstanceNameFromDataservice(DataService2.class); assertThat(result).isEqualTo("dS2"); }