RestoreSnapshotTaskResult extends CreateRestoreBridgeResult { public static RestoreSnapshotTaskResult deserialize(String taskResult) { JaxbJsonSerializer<RestoreSnapshotTaskResult> serializer = new JaxbJsonSerializer<>(RestoreSnapshotTaskResult.class); try { return serializer.deserialize(taskResult); } catch (IOException e) { throw new SnapshotDataException( "Unable to create task result due to: " + e.getMessage()); } }  String getSpaceId(); void setSpaceId(String spaceId); String serialize(); static RestoreSnapshotTaskResult deserialize(String taskResult);  }
@Test public void testDeserialize() { String resultSerialized = "{\"spaceId\" : \"space-id\"," + "\"restoreId\" : \"restore-id\"," + "\"status\":\"" + RestoreStatus.TRANSFERRING_TO_DURACLOUD + "\"}"; RestoreSnapshotTaskResult taskResult = RestoreSnapshotTaskResult.deserialize(resultSerialized); assertEquals("space-id", taskResult.getSpaceId()); assertEquals("restore-id", taskResult.getRestoreId()); assertEquals(RestoreStatus.TRANSFERRING_TO_DURACLOUD, taskResult.getStatus()); }