### Question:
TaskDefinitionService { public List<TaskDefinition> findAllEntities(final String productIdentifier) { return taskDefinitionRepository.findByProductId(productIdentifier) .map(TaskDefinitionMapper::map) .collect(Collectors.toList()); } @Autowired  TaskDefinitionService(
          final TaskDefinitionRepository taskDefinitionRepository); List<TaskDefinition> findAllEntities(final String productIdentifier); Optional<TaskDefinition> findByIdentifier(final String productIdentifier, final String identifier);  }### Answer:
@Test public void findAllEntities() { findAllEntitiesHelper(false); findAllEntitiesHelper(true); }