### Question:
AbstractRestAuthCallbackHandler implements RestAuthCallbackHandler<T> { boolean isJsonAttributePresent(JsonValue jsonObject, String attributeName) { if (jsonObject.get(attributeName).isNull()) { return false; } return true; }  boolean updateCallbackFromRequest(HttpServletRequest request, HttpServletResponse response, T callback);  }### Answer:
@Test public void shouldCheckIfJsonAttributePresentWithTrue() throws JSONException { String attributeName = "ATTRIBUTE_NAME"; Map<String, String> map = new LinkedHashMap<String, String>(); map.put("ATTRIBUTE_NAME", "VALUE"); JsonValue jsonObject = new JsonValue(map); boolean isAttributePresent = abstractRestAuthCallbackHandler.isJsonAttributePresent(jsonObject, attributeName); assertTrue(isAttributePresent); }
@Test public void shouldCheckIfJsonAttributePresentWithFalse() throws JSONException { String attributeName = "ATTRIBUTE_NAME"; Map<String, String> map = new LinkedHashMap<String, String>(); map.put("OTHER_ATTRIBUTE_NAME", "VALUE"); JsonValue jsonObject = new JsonValue(map); boolean isAttributePresent = abstractRestAuthCallbackHandler.isJsonAttributePresent(jsonObject, attributeName); assertFalse(isAttributePresent); }