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