@Parameterized.Parameters(name = "Order.compare({0},{1}) = {2}")
        public static Iterable<Object[]> data() throws ParseException {
            return new ArrayList<>(Arrays.asList(new Object[][]{
                    // NaN tests - compares to 0 for itself, but larger than anything else including +Inf
                    {NaN, NaN, 0},
                    {null, NaN, -1},
                    {NaN, null, 1},
                    {null, null, 0},
                    {NaN, 0, 1},
                    {0, NaN, -1},
                    {NaN, Double.POSITIVE_INFINITY, 1},
                    {NaN, Float.POSITIVE_INFINITY, 1},

                    // type promotion means no stable order for Numbers
                    {1, 1.0d, 0},
                    {1.0d, 1, 0},

                    // cross type
                    {"foo", 1, Type.String.priority() - Type.Number.priority()},
                    {MutablePath.make(), Collections.emptySet(), Type.Path.priority() - Type.Set.priority()},
                    
                    // Collections
                    {asList(1, 2, 3), asList(1, 2, 3), 0},
                    {asList(1, 2, 3), asList(1, 2, 3, 4), -1},
                    {asList(1, 2, 4), asList(1, 2, 3, 4), 1},
                    {asSet(1, 2, 3), asSet(1, 2, 3), 0},
                    {asSet(1, 2, 3), asSet(1, 2, 3, 4), -1},
                    {asSet(1, 2, 4), asSet(1, 2, 3, 4), 1},
                    {asMap(1, 1, 2, 2, 3, 3), asMap(1, 1, 2, 2, 3, 3), 0},
                    {asMap(1, 1, 2, 2, 3, 3), asMap(1, 1, 2, 2, 3, 3, 4, 4), -1},
                    {asMap(1, 1, 2, "foo", 3, 3), asMap(1, 1, 2, 2, 3, 3), Type.String.priority() - Type.Number.priority()},
                    {asList(Double.NaN), asList(Float.NaN), 0},
                    {asList(Double.NaN), asList(0), 1},
                    {asList(0), asList(Double.NaN), -1},
                    {asMap(1, 1), asMap(1, null), 1},
                    {asList(0), asList("foo"), Type.Number.priority() - Type.String.priority()},
                    // sorting
                    {asSet(1, 2, 3), asSet(3, 2, 1), 0},
                    {asSet(1, 2, 3), asSet(3.0, 2.0, 1.0), 0},
                    {asMap(1, 1, 2, 2, 3, 3), asMap(3, 3, 2, 2, 1, 1), 0},
                    {asMap(1, 1, 2, 2, 3, 3), asMap(3.0, 3.0, 2.0, 2.0, 1.0, 1.0), 0},

            }));
        }
@author Mike Personick (http://github.com/mikepersonick)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/OrderTest.java