@Test
    public void shouldAttachPropertiesButNotLabelsOrId() {
        final Element mockElement = mock(Element.class);
        final Graph mockGraph = mock(Graph.class);
        final Graph.Features mockGraphFeatures = mock(Graph.Features.class);
        final Graph.Features.VertexFeatures mockVertexFeatures = mock(Graph.Features.VertexFeatures.class);
        final Graph.Features.VertexPropertyFeatures mockVertexPropertyFeatures = mock(Graph.Features.VertexPropertyFeatures.class);
        when(mockElement.graph()).thenReturn(mockGraph);
        when(mockGraph.features()).thenReturn(mockGraphFeatures);
        when(mockGraphFeatures.vertex()).thenReturn(mockVertexFeatures);
        when(mockVertexFeatures.properties()).thenReturn(mockVertexPropertyFeatures);
        when(mockVertexPropertyFeatures.supportsNullPropertyValues()).thenReturn(true);
        ElementHelper.attachProperties(mockElement, "test", 123, T.id, 321, T.label, "friends");
        verify(mockElement, times(1)).property("test", 123);
        verify(mockElement, times(0)).property(T.id.getAccessor(), 321);
        verify(mockElement, times(0)).property(T.label.getAccessor(), "friends");
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/util/ElementHelperTest.java