ServiceTools { public String getShortName(String fullformat) { if (fullformat != null) { return fullformat.replaceAll("(\\w)*\\.", ""); } return ""; }  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 testGetShortName() throws NoSuchMethodException { System.out.println("getShortName"); String fullname = "java.lang.Collection<java.lang.Map<java.lang.String, java.lang.Collection<java.lang.Integer>>>"; String expResult = "Collection<Map<String, Collection<Integer>>>"; String result = instance.getShortName(fullname); assertThat(result).isEqualTo(expResult); result = instance.getShortName(null); assertThat(result).isEqualTo(""); }