@Test public void testFailedBackup() { datalakeDRProto.BackupDatalakeStatusResponse.Builder builder = datalakeDRProto.BackupDatalakeStatusResponse.newBuilder() .setOverallState("FAILED") .setFailureReason(FAILURE_REASON); DatalakeDrStatusResponse response = underTest.convert(builder.build()); assertEquals(DatalakeDrStatusResponse.State.FAILED, response.getState()); assertEquals(FAILURE_REASON, response.getFailureReason()); assert response.isComplete(); }
public DatalakeDrStatusResponse convert(datalakeDRProto.BackupDatalakeStatusResponse response) { return new DatalakeDrStatusResponse( DatalakeDrStatusResponse.State.valueOf(response.getOverallState()), Optional.ofNullable(response.getFailureReason()) ); }
GrpcStatusResponseToDatalakeDrStatusResponseConverter { public DatalakeDrStatusResponse convert(datalakeDRProto.BackupDatalakeStatusResponse response) { return new DatalakeDrStatusResponse( DatalakeDrStatusResponse.State.valueOf(response.getOverallState()), Optional.ofNullable(response.getFailureReason()) ); } }
GrpcStatusResponseToDatalakeDrStatusResponseConverter { public DatalakeDrStatusResponse convert(datalakeDRProto.BackupDatalakeStatusResponse response) { return new DatalakeDrStatusResponse( DatalakeDrStatusResponse.State.valueOf(response.getOverallState()), Optional.ofNullable(response.getFailureReason()) ); }  }
GrpcStatusResponseToDatalakeDrStatusResponseConverter { public DatalakeDrStatusResponse convert(datalakeDRProto.BackupDatalakeStatusResponse response) { return new DatalakeDrStatusResponse( DatalakeDrStatusResponse.State.valueOf(response.getOverallState()), Optional.ofNullable(response.getFailureReason()) ); }  DatalakeDrStatusResponse convert(datalakeDRProto.BackupDatalakeStatusResponse response); DatalakeDrStatusResponse convert(datalakeDRProto.RestoreDatalakeStatusResponse response); }
GrpcStatusResponseToDatalakeDrStatusResponseConverter { public DatalakeDrStatusResponse convert(datalakeDRProto.BackupDatalakeStatusResponse response) { return new DatalakeDrStatusResponse( DatalakeDrStatusResponse.State.valueOf(response.getOverallState()), Optional.ofNullable(response.getFailureReason()) ); }  DatalakeDrStatusResponse convert(datalakeDRProto.BackupDatalakeStatusResponse response); DatalakeDrStatusResponse convert(datalakeDRProto.RestoreDatalakeStatusResponse response);  }