public static Map<String, Object> getRowDataMap(Row source) {
        Map<String, Object> toReturn = new HashMap<>();
        List<Element> elements = source.getContent().stream()
                .filter(Element.class::isInstance)
                .map(Element.class::cast)
                .collect(Collectors.toList());
        if (!elements.isEmpty()) {
            elements.forEach(el -> populateWithElement(toReturn, el));
        } else {
            InputCell inputCell = source.getContent().stream()
                    .filter(InputCell.class::isInstance)
                    .map(InputCell.class::cast)
                    .findFirst()
                    .orElse(null);
            OutputCell outputCell = source.getContent().stream()
                    .filter(OutputCell.class::isInstance)
                    .map(OutputCell.class::cast)
                    .findFirst()
                    .orElse(null);
            populateWithCells(toReturn, inputCell, outputCell);
        }
        return toReturn;
    }
@Test
    void getRowDataMap() {
        Row source = getRandomRowWithCells();
        Map<String, Object> retrieved = ModelUtils.getRowDataMap(source);
        InputCell inputCell = source.getContent().stream()
                .filter(InputCell.class::isInstance)
                .map(InputCell.class::cast)
                .findFirst()
                .get();
        OutputCell outputCell = source.getContent().stream()
                .filter(OutputCell.class::isInstance)
                .map(OutputCell.class::cast)
                .findFirst()
                .get();
        assertThat(retrieved).hasSize(2);
        String expected = getPrefixedName(inputCell.getName());
        assertThat(retrieved).containsKey(expected);
        assertThat(retrieved.get(expected)).isEqualTo(inputCell.getValue());

        expected = getPrefixedName(outputCell.getName());
        assertThat(retrieved).containsKey(expected);
        assertThat(retrieved.get(expected)).isEqualTo(outputCell.getValue());
    }