if (notExpected.isEmpty() && notFound.isEmpty()) {
// check entries order
int index = 0;
for (K keyFromActual : actual.keySet()) {
if (!areEqual(keyFromActual, entries[index].key)) {
MapEntry actualEntry = entry(keyFromActual, actual.get(keyFromActual));
throw failures.failure(info, shouldContainExactly(actualEntry, entries[index], index));
}
index++;
}
// all entries are in the same order.