ServiceTools { Object getObjectFromConstantFields(Class cls) { Field[] fields = cls.getFields(); Object instance = null; for (Field field : fields) { instance = getObjectFromConstantField(cls, field); if(instance!=null) { break; } } return instance; }  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 testGetObjectFromConstantFields() { System.out.println("getObjectFromConstantFields"); Object result = instance.getObjectFromConstantFields(String.class); assertThat(result).isNull(); result = instance.getObjectFromConstantFields(Locale.class); assertThat(result).isInstanceOf(Locale.class); }