@Test
    public void shouldAllowNulls() {
        final TraversalSideEffects sideEffects = new DefaultTraversalSideEffects();
        sideEffects.register("k", new ConstantSupplier<>(null), null);
        assertNull(sideEffects.get("k"));

        sideEffects.set("k", "x");
        assertEquals("x", sideEffects.get("k"));

        sideEffects.set("k", null);
        assertNull(sideEffects.get("k"));

        sideEffects.add("k", null);
        assertNull(sideEffects.get("k"));

        sideEffects.register("kand", new ConstantSupplier<>(null), Operator.and);
        sideEffects.add("kand", null);
        assertNull(sideEffects.get("kand"));

        sideEffects.add("kand", true);
        assertThat(sideEffects.get("kand"), is(true));
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversalSideEffectsTest.java