ElementSerialiser extends PropertiesSerialiser<Element> { @Override public boolean canHandle(final Class clazz) { return Element.class.isAssignableFrom(clazz); } 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 testCantSerialiseIntegerClass() throws SerialisationException { assertFalse(serialiser.canHandle(Integer.class)); }
@Test public void testCanSerialiseElementClass() throws SerialisationException { assertTrue(serialiser.canHandle(Element.class)); }