@Test
    public void shouldProvideClearErrorWhenTryingToMutateT() {
        final GraphTraversalSource g = TinkerGraph.open().traversal();
        g.addV("person").property(T.id, 100).iterate();

        try {
            g.V(100).property(T.label, "software").iterate();
            fail("Should have thrown an error");
        } catch (IllegalStateException ise) {
            assertEquals("T.label is immutable on existing elements", ise.getMessage());
        }

        try {
            g.V(100).property(T.id, 101).iterate();
            fail("Should have thrown an error");
        } catch (IllegalStateException ise) {
            assertEquals("T.id is immutable on existing elements", ise.getMessage());
        }

        try {
            g.V(100).property("name", "marko").property(T.label, "software").iterate();
            fail("Should have thrown an error");
        } catch (IllegalStateException ise) {
            assertEquals("T.label is immutable on existing elements", ise.getMessage());
        }

        try {
            g.V(100).property(T.id, 101).property("name", "marko").iterate();
            fail("Should have thrown an error");
        } catch (IllegalStateException ise) {
            assertEquals("T.id is immutable on existing elements", ise.getMessage());
        }
    }
Validating that mid-traversal hasId() also unwraps ids in lists in addition to ids in arrays as per TINKERPOP-2863
tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphTest.java