ServiceTools { Object getConstantFromField(Field field) throws IllegalArgumentException, IllegalAccessException { return field.get(null); }  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 testGetConstantFromField() throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException { System.out.println("getConstantFromField"); Field field = Locale.class.getDeclaredField("US"); instance.getConstantFromField(field); }
@Test(expected = IllegalAccessException.class) public void testGetConstantFromFieldFailed1() throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException { System.out.println("getConstantFromField"); Field field = Result.class.getDeclaredField("fieldOfClass"); System.out.println("FIELD = "+field); instance.getConstantFromField(field); }