Object value1 = list1.get(i);
Object value2 = list2.get(i);
if (value1 instanceof Configuration)
{
ConfigurationComparator comparator = new StrictConfigurationComparator();
assertTrue("The dictionnary at index " + i + " for the key '" + key + "' doesn't match", comparator.compare((Configuration) value1, (Configuration) value2));
}
else
{
assertEquals("Element at index " + i + " for the key '" + key + "'", value1, value2);
}