Marshaller marshaller = testMarshallerProvider.create(configuration.clone(), byteOutput);
System.out.println("Marshaller = " + marshaller + " (version set to " + configuration.getVersion() + ")");
marshaller.writeObject(serializable);
marshaller.finish();
byte[] bytes = baos.toByteArray();
ByteInput byteInput = Marshalling.createByteInput(new ByteArrayInputStream(bytes));
Unmarshaller unmarshaller = testUnmarshallerProvider.create(configuration.clone(), byteInput);
System.out.println("Unmarshaller = " + unmarshaller + " (version set to " + configuration.getVersion() + ")");
assertEquals(serializable, unmarshaller.readObject());
unmarshaller.finish();
assertEOF(unmarshaller);