EnableStreamingTaskResult { public static EnableStreamingTaskResult deserialize(String taskResult) { JaxbJsonSerializer<EnableStreamingTaskResult> serializer = new JaxbJsonSerializer<>(EnableStreamingTaskResult.class); try { return serializer.deserialize(taskResult); } catch (IOException e) { throw new TaskDataException( "Unable to create task result due to: " + e.getMessage()); } } EnableStreamingTaskResult();  EnableStreamingTaskResult(String result, String streamingHost); String getResult(); void setResult(String result); String getStreamingHost(); void setStreamingHost(String streamingHost); String serialize(); static EnableStreamingTaskResult deserialize(String taskResult);  }
@Test public void testDeserialize() { String resultSerialized = "{\"result\" : \"" + resultValue + "\"," + "\"streamingHost\":\"" + streamingHost + "\"}"; EnableStreamingTaskResult taskResult = EnableStreamingTaskResult.deserialize(resultSerialized); assertEquals(resultValue, taskResult.getResult()); assertEquals(streamingHost, taskResult.getStreamingHost()); }