### Question:
KryoSerializer implements ISerializer { @Override public byte[] serialize(final Object object) { LOG.debug("Going to serialize: '{}'", object); try (Output buffer = getBuffer(object)) { getKryo().writeClassAndObject(buffer, object); byte[] data = buffer.toBytes(); if (data == null) { LOG.error("Kryo wasn't able to serialize: '{}'", object); } buffer.reset(); return data; } finally { System.runFinalization(); } } KryoSerializer();  KryoSerializer(final Bytes bufferSize); @Override byte[] serialize(final Object object); @Override Object deserialize(byte[] data);  }### Answer:
@Test public void notSerializableCompontentThrowsException() { assertThrows(KryoException.class, () -> { NotSerializablePage page = tester.startPage(NotSerializablePage.class, new PageParameters().add("Test", "asString")); tester.assertRenderedPage(NotSerializablePage.class); ISerializer pageSerializer = getAndCheckSerializer(); byte[] data = pageSerializer.serialize(page); }); }