@Test public void getString_whenFieldPresent_findsAndReturnsField() { JSONObject jsonObject = new JSONObject(); try { jsonObject.put("key", "value"); assertEquals("value", StripeJsonUtils.getString(jsonObject, "key")); } catch (JSONException jex) { fail("No exception expected"); } }
@Nullable static String getString( @NonNull JSONObject jsonObject, @NonNull @Size(min = 1) String fieldName) throws JSONException { return nullIfNullOrEmpty(jsonObject.getString(fieldName)); }
StripeJsonUtils { @Nullable static String getString( @NonNull JSONObject jsonObject, @NonNull @Size(min = 1) String fieldName) throws JSONException { return nullIfNullOrEmpty(jsonObject.getString(fieldName)); } }
StripeJsonUtils { @Nullable static String getString( @NonNull JSONObject jsonObject, @NonNull @Size(min = 1) String fieldName) throws JSONException { return nullIfNullOrEmpty(jsonObject.getString(fieldName)); }  }
StripeJsonUtils { @Nullable static String getString( @NonNull JSONObject jsonObject, @NonNull @Size(min = 1) String fieldName) throws JSONException { return nullIfNullOrEmpty(jsonObject.getString(fieldName)); }   }
StripeJsonUtils { @Nullable static String getString( @NonNull JSONObject jsonObject, @NonNull @Size(min = 1) String fieldName) throws JSONException { return nullIfNullOrEmpty(jsonObject.getString(fieldName)); }    }