final TestSerializable t = new TestSerializable();
ByteArrayOutputStream baos = new ByteArrayOutputStream(10240);
ByteOutput byteOutput = Marshalling.createByteOutput(baos);
Marshaller marshaller = testMarshallerProvider.create(configuration.clone(), byteOutput);
if (marshaller instanceof ObjectOutputStreamMarshaller) {
throw new SkipException(marshaller + " doesn't support start()");
}
System.out.println("Marshaller = " + marshaller + " (version set to " + configuration.getVersion() + ")");
marshaller.writeObject(t);
marshaller.finish();
byte[] bytes = baos.toByteArray();
ByteInput byteInput = Marshalling.createByteInput(new ByteArrayInputStream(bytes));
Unmarshaller unmarshaller = testUnmarshallerProvider.create(configuration.clone(), byteInput);
if (unmarshaller instanceof ObjectInputStreamUnmarshaller) {
throw new SkipException(unmarshaller + " doesn't support start()");
}
System.out.println("Unmarshaller = " + unmarshaller + " (version set to " + configuration.getVersion() + ")");
assertEquals(t, unmarshaller.readObject());
unmarshaller.finish();
baos.reset();