CreateSnapshotTaskResult extends CreateSnapshotBridgeResult { public static CreateSnapshotTaskResult deserialize(String taskResult) { JaxbJsonSerializer<CreateSnapshotTaskResult> serializer = new JaxbJsonSerializer<>(CreateSnapshotTaskResult.class); try { return serializer.deserialize(taskResult); } catch (IOException e) { throw new SnapshotDataException( "Unable to create task result due to: " + e.getMessage()); } }  static CreateSnapshotTaskResult deserialize(String taskResult);  }
@Test public void testDeserialize() { String resultSerialized = "{\"snapshotId\" : \"snapshot-id\"," + "\"status\":\"" + SnapshotStatus.INITIALIZED + "\"}"; CreateSnapshotTaskResult taskResult = CreateSnapshotTaskResult.deserialize(resultSerialized); assertEquals("snapshot-id", taskResult.getSnapshotId()); assertEquals(SnapshotStatus.INITIALIZED, taskResult.getStatus()); }