@Test
    public void shouldReadWriteProperty() throws Exception {
        final String resourceName = "edge-property";

        final Property resource = findModelEntryObject(resourceName);
        final byte[] bytes = write(resource, Property.class, resourceName);
        final HashMap fromStatic = read(readFromResource(resourceName), HashMap.class);
        final HashMap recycled = read(bytes, HashMap.class);
        assertNotSame(fromStatic, recycled);
        assertEquals(2, fromStatic.size());
        assertEquals(resource.key(), fromStatic.get("key"));
        assertEquals(resource.value(), fromStatic.get("value"));
        assertEquals(2, recycled.size());
        assertEquals(resource.key(), recycled.get("key"));
        assertEquals(resource.value(), recycled.get("value"));
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/structure/io/AbstractUntypedCompatibilityTest.java