VertexWrapper { public void setProperty(String name, Object value) { vertex.setProperty(propertyMapper.toFullyQualifiedName(name, vertexType), value); } VertexWrapper(Vertex v, ResourceDefinition resourceDefinition);  VertexWrapper(Vertex v,
                         PropertyMapper mapper,
                         Map<String, PropertyValueFormatter> formatters); Vertex getVertex(); T getProperty(String name); void setProperty(String name, Object value); Collection<String> getPropertyKeys(); Map<String, Object> getPropertyMap(); void removeProperty(String name); boolean isPropertyRemoved(String name); String toString();  }
@Test public void testSetProperty() { String testType = "testType"; String cleanPropName = "prop1"; String qualifiedPropName = "test.prop1"; String propValue = "newValue"; Vertex v = createStrictMock(Vertex.class); PropertyMapper propertyMapper = createStrictMock(PropertyMapper.class); expect(v.<String>getProperty(Constants.ENTITY_TYPE_PROPERTY_KEY)).andReturn(testType); expect(propertyMapper.toFullyQualifiedName(cleanPropName, testType)).andReturn(qualifiedPropName); v.setProperty(qualifiedPropName, propValue); replay(v, propertyMapper); VertexWrapper vWrapper = new VertexWrapper( v, propertyMapper, Collections.<String, PropertyValueFormatter>emptyMap()); vWrapper.setProperty(cleanPropName, propValue); verify(v, propertyMapper); }