public DeletionServiceDeleteTaskProto convertDeletionTaskToProto() {
    DeletionServiceDeleteTaskProto.Builder builder =
        getBaseDeletionTaskProtoBuilder();
    builder.setTaskType(DeletionTaskType.DOCKER_CONTAINER.name());
    if (getContainerId() != null) {
      builder.setDockerContainerId(getContainerId());
    }
    return builder.build();
  }
@Test
  public void testConvertDeletionTaskToProto() {
    YarnServerNodemanagerRecoveryProtos.DeletionServiceDeleteTaskProto proto =
        deletionTask.convertDeletionTaskToProto();
    assertEquals(ID, proto.getId());
    assertEquals(USER, proto.getUser());
    assertEquals(CONTAINER_ID, proto.getDockerContainerId());
    assertEquals(DeletionTaskType.DOCKER_CONTAINER.name(), proto.getTaskType());
  }