public List<Flow> convertFlows(String componentName, @Nullable DbIssues.Locations issueLocations) {
    if (issueLocations == null) {
      return Collections.emptyList();
    }
    return issueLocations.getFlowList().stream()
      .map(sourceFlow -> toFlow(componentName, sourceFlow))
      .collect(Collectors.toCollection(LinkedList::new));
  }
@Test
  public void convertFlows_withSingleDbLocations_returnsCorrectFlow() {
    DbIssues.Location location = createDbLocation("comp_id_1");
    DbIssues.Locations issueLocations = DbIssues.Locations.newBuilder()
      .addFlow(createFlow(location))
      .build();

    List<Flow> flows = flowGenerator.convertFlows(COMPONENT_NAME, issueLocations);

    assertThat(flows).hasSize(1);
    Flow singleFlow = flows.iterator().next();

    assertThat(singleFlow.getLocations()).hasSize(1);
    Location singleLocation = singleFlow.getLocations().iterator().next();

    assertLocationMatches(singleLocation, location);
  }