Fix tests for Java8, where we can't rely on previous map iteration order