@Test
    public void shouldWorkWithoutIdentityStrategy() {
        final Graph graph = TinkerFactory.createModern();
        final GraphTraversalSource g = traversal().withEmbedded(graph).withoutStrategies(IdentityRemovalStrategy.class);
        final List<Map<String,Object>> result = g.V().match(__.as("a").out("knows").values("name").as("b")).identity().toList();
        assertEquals(2, result.size());
        result.stream().forEach(m -> {
            assertEquals(2, m.size());
            assertThat(m.containsKey("a"), is(true));
            assertThat(m.containsKey("b"), is(true));
        });
    }
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