AddElements implements
        Validatable,
        MultiInput<Element> { @Override public Iterable<? extends Element> getInput() { return elements; }  @Override boolean isValidate(); @Override void setValidate(final boolean validate); @Override boolean isSkipInvalidElements(); @Override void setSkipInvalidElements(final boolean skipInvalidElements); @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "class") @Override Object[] createInputArray(); @Override Iterable<? extends Element> getInput(); @Override void setInput(final Iterable<? extends Element> elements); @Override Map<String, String> getOptions(); @Override void setOptions(final Map<String, String> options); @Override AddElements shallowClone(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void shouldDeserialiseAddElementsOperation() throws IOException { final AddElements addElements = JSONSerialiser.deserialise(ADD_ELEMENTS_JSON.getBytes(), AddElements.class); final Iterator<? extends Element> itr = addElements.getInput().iterator(); final Entity elm1 = (Entity) itr.next(); assertEquals("vertex 1", elm1.getVertex()); assertEquals(1, elm1.getProperties().size()); assertEquals("property 1 value", elm1.getProperty("property 1")); final Edge elm2 = (Edge) itr.next(); assertEquals("source vertex 1", elm2.getSource()); assertEquals("dest vertex 1", elm2.getDestination()); assertTrue(elm2.isDirected()); assertEquals(1, elm2.getProperties().size()); assertEquals("property 2 value", elm2.getProperty("property 2")); assertFalse(itr.hasNext()); }