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();
byteOutput = Marshalling.createByteOutput(baos);
marshaller.start(byteOutput);
marshaller.writeObject(t);
marshaller.finish();
bytes = baos.toByteArray();
byteInput = Marshalling.createByteInput(new ByteArrayInputStream(bytes));
unmarshaller.start(byteInput);
System.out.println("Unmarshaller = " + unmarshaller + " (version set to " + configuration.getVersion() + ")");
assertEquals(t, unmarshaller.readObject());
unmarshaller.finish();
}