@Test public void shouldCreateJsonFieldWithNullObjectArray() { String name = "NAME"; String[] values = null; JsonValue jsonObject = abstractRestAuthCallbackHandler.createJsonField(name, values); assertEquals(jsonObject.get("name").asString(), "NAME"); assertEquals(jsonObject.get("value").size(), 0); }
final JsonValue createJsonField(String name, Object value) { return JsonValueBuilder.jsonValue() .put("name", name == null ? "" : name) .put("value", value == null ? "" : value) .build(); }
AbstractRestAuthCallbackHandler implements RestAuthCallbackHandler<T> { final JsonValue createJsonField(String name, Object value) { return JsonValueBuilder.jsonValue() .put("name", name == null ? "" : name) .put("value", value == null ? "" : value) .build(); } }
AbstractRestAuthCallbackHandler implements RestAuthCallbackHandler<T> { final JsonValue createJsonField(String name, Object value) { return JsonValueBuilder.jsonValue() .put("name", name == null ? "" : name) .put("value", value == null ? "" : value) .build(); }  }
AbstractRestAuthCallbackHandler implements RestAuthCallbackHandler<T> { final JsonValue createJsonField(String name, Object value) { return JsonValueBuilder.jsonValue() .put("name", name == null ? "" : name) .put("value", value == null ? "" : value) .build(); }  boolean updateCallbackFromRequest(HttpHeaders headers, HttpServletRequest request,
            HttpServletResponse response, T callback); }
AbstractRestAuthCallbackHandler implements RestAuthCallbackHandler<T> { final JsonValue createJsonField(String name, Object value) { return JsonValueBuilder.jsonValue() .put("name", name == null ? "" : name) .put("value", value == null ? "" : value) .build(); }  boolean updateCallbackFromRequest(HttpHeaders headers, HttpServletRequest request,
            HttpServletResponse response, T callback);  }