@Test
    public void shouldThrowWhenDuplicateKeySupplied() {
        try {
            __.project("x", "x");
            fail("Should throw an exception.");
        } catch (final Exception re) {
            assertThat(re, instanceOf(IllegalArgumentException.class));
            assertThat(re.getMessage(), is("keys must be unique in ProjectStep"));
        }
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/ProjectStepTest.java