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