@Test public void testInvalidRestoreStatus() { datalakeDRProto.RestoreDatalakeStatusResponse.Builder builder = datalakeDRProto.RestoreDatalakeStatusResponse.newBuilder() .setOverallState("INVALID_STAUS"); assertThrows(IllegalArgumentException.class, () -> { underTest.convert(builder.build()); }); }
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);  }