NMProtoUtils { public static DeletionTaskRecoveryInfo convertProtoToDeletionTaskRecoveryInfo( DeletionServiceDeleteTaskProto proto, DeletionService deletionService) { DeletionTask deletionTask = NMProtoUtils.convertProtoToDeletionTask(proto, deletionService); List<Integer> successorTaskIds = new ArrayList<>(); if (proto.getSuccessorIdsList() != null && !proto.getSuccessorIdsList().isEmpty()) { successorTaskIds = proto.getSuccessorIdsList(); } long deletionTimestamp = proto.getDeletionTime(); return new DeletionTaskRecoveryInfo(deletionTask, successorTaskIds, deletionTimestamp); } private  NMProtoUtils(); static DeletionTask convertProtoToDeletionTask(
      DeletionServiceDeleteTaskProto proto, DeletionService deletionService); static FileDeletionTask convertProtoToFileDeletionTask(
      DeletionServiceDeleteTaskProto proto, DeletionService deletionService,
      int taskId); static DockerContainerDeletionTask convertProtoToDockerContainerDeletionTask(
      DeletionServiceDeleteTaskProto proto, DeletionService deletionService,
      int taskId); static DeletionTaskRecoveryInfo convertProtoToDeletionTaskRecoveryInfo(
      DeletionServiceDeleteTaskProto proto, DeletionService deletionService);  }
@Test public void testConvertProtoToDeletionTaskRecoveryInfo() throws Exception { long delTime = System.currentTimeMillis(); List<Integer> successorTaskIds = Arrays.asList(1); DeletionTask deletionTask = mock(DeletionTask.class); DeletionTaskRecoveryInfo info = new DeletionTaskRecoveryInfo(deletionTask, successorTaskIds, delTime); assertEquals(deletionTask, info.getTask()); assertEquals(successorTaskIds, info.getSuccessorTaskIds()); assertEquals(delTime, info.getDeletionTimestamp()); }