### Question:
DatastoreIngestionStrategyRepository implements IIngestionStrategyRepository { @Override public IngestionStrategy findByWorkflowTypeAndDataTypeAndUserId(WorkflowType workflowType, String dataType, String userId) { log.debug("Requesting dag selection. Workflow type : {}, Data type : {}, User id : {}", workflowType, dataType, userId); IngestionStrategyEntity entity = ingestionStrategyEntityRepository .findByWorkflowTypeAndDataTypeAndUserId(asString(workflowType), dataType, userId); IngestionStrategy ingestionStrategy = ingestionStrategyMapper.toIngestionStrategy(entity); log.debug("Found dag : {}", ingestionStrategy); return ingestionStrategy; }  @Override IngestionStrategy findByWorkflowTypeAndDataTypeAndUserId(WorkflowType workflowType,
      String dataType, String userId);  }### Answer:
@Test void shouldFindIngestionStrategyByWorkflowTypeAndDataType() { given(ingestionStrategyEntityRepository.findByWorkflowTypeAndDataTypeAndUserId( INGEST_WORKFLOW_TYPE, WELL_LOG_DATA_TYPE, USER)) .willReturn(getIngestionStrategyEntity()); IngestionStrategy ingestionStrategy = ingestionStrategyRepository .findByWorkflowTypeAndDataTypeAndUserId(WorkflowType.INGEST, "well_log", USER); then(ingestionStrategy).isEqualTo(getIngestionStrategy()); InOrder inOrder = Mockito.inOrder(ingestionStrategyEntityRepository, ingestionStrategyMapper); inOrder.verify(ingestionStrategyEntityRepository) .findByWorkflowTypeAndDataTypeAndUserId(INGEST_WORKFLOW_TYPE, WELL_LOG_DATA_TYPE, USER); inOrder.verify(ingestionStrategyMapper).toIngestionStrategy(any()); inOrder.verifyNoMoreInteractions(); }
@Test void shouldReturnNullWhenNothingWasFound() { IngestionStrategy ingestionStrategy = ingestionStrategyRepository .findByWorkflowTypeAndDataTypeAndUserId(WorkflowType.INGEST, "well_log", USER); then(ingestionStrategy).isNull(); InOrder inOrder = Mockito.inOrder(ingestionStrategyEntityRepository, ingestionStrategyMapper); inOrder.verify(ingestionStrategyEntityRepository) .findByWorkflowTypeAndDataTypeAndUserId(INGEST_WORKFLOW_TYPE, WELL_LOG_DATA_TYPE, USER); inOrder.verify(ingestionStrategyMapper).toIngestionStrategy(any()); inOrder.verifyNoMoreInteractions(); }