Here, if a given ruleId happen several time in the expectedConfigurationReports sequence, you will loose information ( (1,1), (1,2) ).toMap => [(1 -> 2)] )