class CellInfoUtil {

    public static Map<Cell, String> extractCellRoutingFromCellSpecification(List<Cell> cells, String cellRoutingSpecification) {
        Map<String, Cell> cellsByName = CollectionsExt.indexBy(cells, Cell::getName);

        return Arrays.stream(cellRoutingSpecification.split(CELL_ROUTE_DELIM))
                .filter(cellRoutingSpec -> cellRoutingSpec.contains(CELL_ROUTE_RULE_DELIM))
                .map(CellRoutingSpec::new)
                .filter(spec -> isCellConfigured(cellsByName, spec))
                .collect(Collectors.toMap(
                        spec -> cellsByName.get(spec.getCellName()),
                        CellRoutingSpec::getRoutingRule,
                        CellInfoUtil::mergeKeepingFirst,
                        LinkedHashMap::new
                ));
    }

}