@Test
public void testClassLoaderObjectInputStream() throws Exception {

	TestSerializable testSerializable = new TestSerializable("test");
	UnsyncByteArrayOutputStream unsyncByteArrayOutputStream =
		new UnsyncByteArrayOutputStream();
	try (ObjectOutputStream objectOutputStream = new ObjectOutputStream(
			unsyncByteArrayOutputStream)) {
		objectOutputStream.writeObject(testSerializable);
		objectOutputStream.flush();
	}
	UnsyncByteArrayInputStream unsyncByteArrayInputStream =
		new UnsyncByteArrayInputStream(
			unsyncByteArrayOutputStream.unsafeGetByteArray());
	try (ObjectInputStream objectInputStream = getObjectInputStream(
			unsyncByteArrayInputStream,
			ClassLoaderObjectInputStreamTest.class.getClassLoader())) {
		Assert.assertEquals(
			testSerializable, objectInputStream.readObject());
	}
}