@Test public void shouldConvertFromJson() { TextOutputCallback textOutputCallback = new TextOutputCallback(TextOutputCallback.INFORMATION, "MESSAGE"); JsonValue jsonTextOutputCallback = JsonValueBuilder.jsonValue() .array("output") .add(JsonValueBuilder.jsonValue().put("value", "MESSAGE").build()) .addLast(JsonValueBuilder.jsonValue().put("value", 0).build()) .put("type", "TextOutputCallback") .build(); TextOutputCallback convertedTextOutputCallback = testOutputRestAuthCallbackHandler.convertFromJson( textOutputCallback, jsonTextOutputCallback); assertEquals(textOutputCallback, convertedTextOutputCallback); assertEquals("MESSAGE", convertedTextOutputCallback.getMessage()); assertEquals(TextOutputCallback.INFORMATION, convertedTextOutputCallback.getMessageType()); }
public TextOutputCallback convertFromJson(TextOutputCallback callback, JsonValue jsonCallback) { validateCallbackType(CALLBACK_NAME, jsonCallback); return callback; }
RestAuthTextOutputCallbackHandler extends AbstractRestAuthCallbackHandler<TextOutputCallback> { public TextOutputCallback convertFromJson(TextOutputCallback callback, JsonValue jsonCallback) { validateCallbackType(CALLBACK_NAME, jsonCallback); return callback; } }
RestAuthTextOutputCallbackHandler extends AbstractRestAuthCallbackHandler<TextOutputCallback> { public TextOutputCallback convertFromJson(TextOutputCallback callback, JsonValue jsonCallback) { validateCallbackType(CALLBACK_NAME, jsonCallback); return callback; }  }
RestAuthTextOutputCallbackHandler extends AbstractRestAuthCallbackHandler<TextOutputCallback> { public TextOutputCallback convertFromJson(TextOutputCallback callback, JsonValue jsonCallback) { validateCallbackType(CALLBACK_NAME, jsonCallback); return callback; }  TextOutputCallback handle(HttpHeaders headers, HttpServletRequest request, HttpServletResponse response,
            JsonValue postBody, TextOutputCallback originalCallback); String getCallbackClassName(); JsonValue convertToJson(TextOutputCallback callback, int index); TextOutputCallback convertFromJson(TextOutputCallback callback, JsonValue jsonCallback); }
RestAuthTextOutputCallbackHandler extends AbstractRestAuthCallbackHandler<TextOutputCallback> { public TextOutputCallback convertFromJson(TextOutputCallback callback, JsonValue jsonCallback) { validateCallbackType(CALLBACK_NAME, jsonCallback); return callback; }  TextOutputCallback handle(HttpHeaders headers, HttpServletRequest request, HttpServletResponse response,
            JsonValue postBody, TextOutputCallback originalCallback); String getCallbackClassName(); JsonValue convertToJson(TextOutputCallback callback, int index); TextOutputCallback convertFromJson(TextOutputCallback callback, JsonValue jsonCallback);  }