CreateRestoreBridgeResult extends BaseDTO { public static CreateRestoreBridgeResult deserialize(String bridgeResult) { JaxbJsonSerializer<CreateRestoreBridgeResult> serializer = new JaxbJsonSerializer<>(CreateRestoreBridgeResult.class); try { return serializer.deserialize(bridgeResult); } catch (IOException e) { throw new SnapshotDataException( "Unable to create result due to: " + e.getMessage()); } } CreateRestoreBridgeResult();  CreateRestoreBridgeResult(String restoreId, RestoreStatus status); String getRestoreId(); void setRestoreId(String restoreId); RestoreStatus getStatus(); void setStatus(RestoreStatus status); String serialize(); static CreateRestoreBridgeResult deserialize(String bridgeResult);  }
@Test public void testDeserialize() { RestoreStatus status = RestoreStatus.INITIALIZED; String restoreId = "restore-id"; String str = "{ \"status\" : \"" + status + "\"," + " \"restoreId\" : \"" + restoreId + "\"}"; CreateRestoreBridgeResult params = CreateRestoreBridgeResult .deserialize(str); Assert.assertEquals(status, params.getStatus()); Assert.assertEquals(restoreId, params.getRestoreId()); }