MultiSerialiser implements ToBytesSerialiser<Object> { public MultiSerialiser addSerialiser(final byte key, final ToBytesSerialiser serialiser, final Class aClass) throws GafferCheckedException { supportedSerialisers.addSerialiserDetails(key, serialiser, aClass); return this; }  void setSerialisers(final List<SerialiserDetail> serialisers); MultiSerialiser addSerialiser(final byte key, final ToBytesSerialiser serialiser, final Class aClass); List<SerialiserDetail> getSerialisers(); @Override byte[] serialise(final Object object); @Override Object deserialise(final byte[] bytes); @Override Object 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 shouldNotAddMultiSerialiser() { try { new MultiSerialiser().addSerialiser((byte) 0, new MultiSerialiser(), Object.class); fail("exception not thrown"); } catch (GafferCheckedException e) { assertEquals(MultiSerialiserStorage.ERROR_ADDING_MULTI_SERIALISER, e.getMessage()); } }