private void addTestStepClientCertificateFile(TestCase body, Map<String, File> formParams) {
   for (TestStep testStep : body.getTestSteps()) {
     if (testStep instanceof RequestTestStepBase) {
       RequestTestStepBase testStepBase = (RequestTestStepBase) testStep;
       addClientCertificateFile(formParams, testStepBase.getClientCertificateFileName());
     }
   }
 }
 private Map<String, File> buildFormParametersForDataSourceFiles(TestCase testCase) {
   Map<String, File> formParams = new HashMap<>();
   for (TestStep testStep : testCase.getTestSteps()) {
     if (testStep instanceof DataSourceTestStep) {
       DataSource dataSource = ((DataSourceTestStep) testStep).getDataSource();
       addDataSourceFile(formParams, dataSource.getExcel());
       addDataSourceFile(formParams, dataSource.getFile());
     }
   }
   return formParams;
 }
 private void verifyDataSourceFilesExist(TestCase testCase) {
   for (TestStep testStep : testCase.getTestSteps()) {
     if (testStep instanceof DataSourceTestStep) {
       DataSource dataSource = ((DataSourceTestStep) testStep).getDataSource();
       if (dataSource.getExcel() != null) {
         verifyFileExists(dataSource.getExcel().getFile());
       }
       if (dataSource.getFile() != null) {
         verifyFileExists(dataSource.getFile().getFile());
       }
     }
   }
 }
  private ProjectResultReport sendPendingFiles(
      TestCase body, ProjectResultReport projectResultReport, List<Pair> queryParams) {
    String path =
        ServerDefaults.SERVICE_BASE_PATH
            + "/executions/"
            + projectResultReport.getExecutionID()
            + "/files";

    Map<String, File> formParams = buildFormParametersForDataSourceFiles(body);
    addClientCertificateFile(formParams, body.getClientCertFileName());
    addTestStepClientCertificateFile(body, formParams);
    if (formParams.isEmpty()) {
      return projectResultReport;
    }
    return invokeAPI(path, POST.name(), body, "multipart/form-data", queryParams, formParams);
  }