ElementSerialiser extends PropertiesSerialiser<Element> { public String getGroup(final byte[] bytes) throws SerialisationException { return StringUtil.toString(LengthValueBytesSerialiserUtil.deserialise(bytes, 0)); } ElementSerialiser();  ElementSerialiser(final Schema schema); @Override boolean canHandle(final Class clazz); @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "If an element is not an Entity it must be an Edge") @Override byte[] serialise(final Element element); @Override Element deserialise(final byte[] bytes); String getGroup(final byte[] bytes); @Override Element deserialiseEmpty(); @Override boolean isConsistent(); @Override boolean equals(final Object obj); @Override int hashCode();  }
@Test public void testGetGroup() throws SerialisationException { final Edge edge = new Edge.Builder().group(TestGroups.ENTITY) .source("source") .dest("destination") .directed(true) .build(); final byte[] serialisedEdge = serialiser.serialise(edge); assertEquals(TestGroups.ENTITY, serialiser.getGroup(serialisedEdge)); }