return obj;
}
private <T> T responseToType(final Object response, Class<T> type) {
if (response instanceof TextWebSocketFrame) {
final TextWebSocketFrame frame = (TextWebSocketFrame) response;
String content = frame.text();
if (content.startsWith("a[")) {
content = TestUtil.extractJsonFromSockJSMessage(content);
}
return JsonUtil.fromJson(content, type);
}