UnionSerialiser implements ToBytesSerialiser<Union> { @Override public boolean canHandle(final Class clazz) { return Union.class.equals(clazz); }  @Override boolean canHandle(final Class clazz); @Override byte[] serialise(final Union union); @Override Union deserialise(final byte[] bytes); @Override Union deserialiseEmpty(); @Override boolean preservesObjectOrdering(); @Override boolean isConsistent(); @Override boolean equals(final Object obj); @Override int hashCode();  }
@Test public void testCanHandleUnion() { assertTrue(serialiser.canHandle(Union.class)); assertFalse(serialiser.canHandle(String.class)); }