@Test
    public void shouldGetKeyValues() {
        final Parameters parameters = new Parameters();
        parameters.set(null, "a", "axe", "b", "bat", "c", "cat");

        final Object[] params = parameters.getKeyValues(mock(Traverser.Admin.class));
        assertEquals(6, params.length);
        Map<Object, Object> paramsMap = new HashMap<>();
        for (int i = 0; i < params.length; i += 2) {
            paramsMap.put(params[i], params[i + 1]);
        }
        Map<Object, Object> expectedMap = new HashMap<>();
        expectedMap.put("a", "axe");
        expectedMap.put("b", "bat");
        expectedMap.put("c", "cat");
        assertThat(paramsMap.equals(expectedMap), is(true));
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/ParametersTest.java