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