### Question:
NameCallback extends AbstractPromptCallback { public void setName(String name) { setValue(name); } @Keep  NameCallback(JSONObject jsonObject, int index); void setName(String name); @Override String getType();  }### Answer:
@Test public void basicTest() throws JSONException { JSONObject raw = new JSONObject("{\n" + " \"type\": \"NameCallback\",\n" + " \"output\": [\n" + " {\n" + " \"name\": \"prompt\",\n" + " \"value\": \"User Name\"\n" + " }\n" + " ],\n" + " \"input\": [\n" + " {\n" + " \"name\": \"IDToken1\",\n" + " \"value\": \"\"\n" + " }\n" + " ],\n" + " \"_id\": 0\n" + " }"); NameCallback nameCallback = new NameCallback(raw, 0); assertEquals("User Name", nameCallback.getPrompt()); nameCallback.setName("tester"); assertEquals(((JSONObject)nameCallback.getContentAsJson().getJSONArray("input").get(0)).getString("value"), "tester"); assertEquals(0, nameCallback.get_id()); }