public void testGetDoubleFunction() {
double expected = 12345.12345;
String jsonText = "{\"key\":" + expected + "}";
String searchedField = "key";
try {
JSONParser parser = new JSONParser(jsonText);
JSONObject jo = parser.parse(searchedField);
assertEquals(expected,jo.getDouble("retValue"),0.000001);
}
catch (JSONException e) {
fail();