@Test
    public void shouldHandleNullSemanticsCorrectly() {
        PATH_SUPPLIERS.forEach(supplier -> {
            final Path p = supplier.get();
            assertThat(p.isSimple(), is(true));
            p.extend(null, Collections.emptySet());
            assertThat(p.isSimple(), is(true));
            p.extend(1, Collections.emptySet());
            assertThat(p.isSimple(), is(true));
            p.extend(null, Collections.emptySet());

            // immutable path won't change so its just going to always be empty and thus always simple
            if (!(p instanceof ImmutablePath)) {
                assertThat(p.isSimple(), is(false));
            }
        });
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/PathTest.java