### Question:
DelfiSubmitService implements SubmitService { @Override public SubmitJobResult submitFile(SubmitFileContext fileContext, RequestContext requestContext) { SubmitFileResult submitFileResult = delfiIngestionClient .submitFile(requestContext.getAuthorizationToken(), portalProperties.getAppKey(), requestContext.getPartition(), requestContext.getPartition(), SubmitFileObject.builder() .kind(fileContext.getKind()) .acl(getAcl(requestContext.getUserGroupEmailByName())) .legalTags(requestContext.getLegalTags()) .filePath(GCS_PROTOCOL + fileContext.getRelativeFilePath()) .fileInput(FileInput.FILE_PATH) .ingestorRoutines(getIngestorRoutines(fileContext)) .build()); return SubmitJobResult.builder() .jobId(submitFileResult.getJobId()) .build(); }  @Override JobPollingResult awaitSubmitJob(String jobId, RequestContext requestContext); @Override SubmitJobResult submitFile(SubmitFileContext fileContext, RequestContext requestContext); @Override DelfiIngestedFile getIngestedFile(SubmittedFile file, JobStatusResponse response,
      RequestContext requestContext);  }### Answer:
@Test public void shouldSubmitFileToIngestIntoDatalakeUsingLasIngestor() { String fileRelativePath = "/some-landing-zone/some-user/uuid/file-name-1.las"; RequestContext requestContext = getRequestContext(); SubmitFileContext fileContext = SubmitFileContext.builder() .relativeFilePath(fileRelativePath) .kind(RECORD_KIND) .wpcResourceTypeId(WPC_RESOURCE_TYPE_ID) .fileResourceTypeId(FILE_RESOURCE_TYPE_ID) .build(); SubmitFileObject fileObject = getSubmitFileObject(fileContext, LAS_INGESTOR); given(delfiIngestionClient.submitFile(AUTHORIZATION_TOKEN, APP_KEY, PARTITION, PARTITION, fileObject)) .willReturn(SubmitFileResult.builder().jobId(JOB_ID_1).build()); SubmitJobResult submitJobResult = submitService.submitFile(fileContext, requestContext); then(submitJobResult).isEqualTo(SubmitJobResult.builder() .jobId(JOB_ID_1) .build()); InOrder inOrder = Mockito.inOrder(restTemplate, delfiIngestionClient, portalService); inOrder.verify(delfiIngestionClient) .submitFile(AUTHORIZATION_TOKEN, APP_KEY, PARTITION, PARTITION, fileObject); inOrder.verifyNoMoreInteractions(); }
@Test public void shouldSubmitFileToIngestIntoDatalakeUsingDefaultIngestor() { String fileRelativePath = "/some-landing-zone/some-user/uuid/file-name-2.csv"; RequestContext requestContext = getRequestContext(); SubmitFileContext fileContext = SubmitFileContext.builder() .relativeFilePath(fileRelativePath) .kind("tenant:ingestion-test:wellbore-traj:1.0.0") .wpcResourceTypeId("srn:type:work-product-component/WellboreTrajectory:version1") .fileResourceTypeId("srn:type:file/csv:version1") .build(); SubmitFileObject fileObject = getSubmitFileObject(fileContext, null); given(delfiIngestionClient.submitFile(AUTHORIZATION_TOKEN, APP_KEY, PARTITION, PARTITION, fileObject)) .willReturn(SubmitFileResult.builder().jobId(JOB_ID_2).build()); SubmitJobResult submitJobResult = submitService.submitFile(fileContext, requestContext); then(submitJobResult).isEqualTo(SubmitJobResult.builder() .jobId(JOB_ID_2) .build()); InOrder inOrder = Mockito.inOrder(restTemplate, delfiIngestionClient, portalService); inOrder.verify(delfiIngestionClient) .submitFile(AUTHORIZATION_TOKEN, APP_KEY, PARTITION, PARTITION, fileObject); inOrder.verifyNoMoreInteractions(); }