o.close();
ByteArrayInputStream is = new ByteArrayInputStream(s.toByteArray());
ObjectInputStream io = new ObjectInputStream(is);
MessageImpl nImpl = (MessageImpl) io.readObject();
o.close();
EPR theEpr = nImpl.getHeader().getCall().getTo();
assertEquals(theEpr instanceof SFTPEpr, true);
assertEquals(((SFTPEpr) theEpr).getCertificateURI().toString(), "http://www.bar.foo");
}