diff --git a/src/test/java/com/onarandombox/MultiverseCore/utils/MockWorldFactory.java b/src/test/java/com/onarandombox/MultiverseCore/utils/MockWorldFactory.java index fb2223cc..c5b68069 100644 --- a/src/test/java/com/onarandombox/MultiverseCore/utils/MockWorldFactory.java +++ b/src/test/java/com/onarandombox/MultiverseCore/utils/MockWorldFactory.java @@ -24,12 +24,13 @@ import java.util.List; import java.util.Map; import java.util.UUID; import java.util.WeakHashMap; +import java.util.LinkedHashMap; import static org.mockito.Mockito.*; public class MockWorldFactory { - private static final Map createdWorlds = new HashMap(); + private static final Map createdWorlds = new LinkedHashMap(); private static final Map worldUIDS = new HashMap(); private static final Map pvpStates = new WeakHashMap(); @@ -212,13 +213,7 @@ public class MockWorldFactory { } public static List getWorlds() { - // we have to invert the order! - ArrayList myList = new ArrayList(createdWorlds.values()); - List retList = new ArrayList(); - for (int i = (myList.size() - 1); i >= 0; i--) { - retList.add(myList.get(i)); - } - return retList; + return new ArrayList(createdWorlds.values()); } public static void clearWorlds() {