@Test
public void shouldSuggestionsShouldBeSorted() throws IOException {

    final String json = IOUtils.toString(this.getClass().getResourceAsStream("sample_column.json"), UTF_8);
    ObjectMapper mapper = new ObjectMapper();
    final ColumnMetadata columnMetadata = mapper.readValue(json, ColumnMetadata.class);
    List<ActionDefinition> actions = new ArrayList<>();
    actions.add(new FillIfEmpty());
    actions.add(new FillInvalid());
    actions.add(new DeleteInvalid());
    actions.add(new DeleteEmpty());
    actions.add(new Absolute());
    actions.add(new UpperCase());
    final Stream<Suggestion> suggestions = suggestionEngine.score(actions.stream(), columnMetadata);
    int currentScore = Integer.MAX_VALUE;
    for (Suggestion suggestion : suggestions.collect(Collectors.toList())) {
        assertTrue(currentScore >= suggestion.getScore());
        currentScore = suggestion.getScore();
    }
}