private static void assertListEquals(List<LocaleCode> list1, List<LocaleCode> list2)
    {
        if (list1 == null)
        {
            if (list2 == null)
            {
                // Equals
                return;
            }
            else
            {
                fail();
                return;
            }
        }
        else if (list2 == null)
        {
            fail();
            return;
        }

        int size = list1.size();

        if (size != list2.size())
        {
            fail();
            return;
        }

        for (int i = 0; i < size; ++i)
        {
            if (list1.get(i) != list2.get(i))
            {
                fail();
                return;
            }
        }
    }