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