in src/main/java/platform/qa/steps/cabinet/ExcerptStepDefinitions.java [86:96]
public void checkCSVExcerptContainsData(@NonNull List<Map<String, String>> excerptExpectedData) {
File excerptFile =
convertToFile(testContext.getScenarioContext().getContext(LAST_DOWNLOAD_FILE));
List<Map<String, String>> actualResultList = CustomFileUtils.parseCsvFile(excerptFile);
List<Map<String, String>> expectedResultList = excerptExpectedData.stream()
.map(map -> map.entrySet().stream()
.collect(Collectors.toMap(Map.Entry::getKey, entry -> isNull(entry.getValue()) ?
StringUtils.EMPTY : entry.getValue())))
.collect(Collectors.toList());
assertThat(actualResultList).as("Excerpt doesn't contain expected data").containsAll(expectedResultList);
}