@Test public void testPackUnpack () throws Exception { DummyXA res = new DummyXA(false); XidImple xid = new XidImple(new Uid()); XAOnePhaseResource xares = new XAOnePhaseResource(res, xid, null); OutputObjectState os = new OutputObjectState(); xares.pack(os); InputObjectState is = new InputObjectState(os); xares.unpack(is); } }
@Test public void test () throws Exception { DummyRecoverableXAConnection rc = new DummyRecoverableXAConnection(); Object[] obj = new Object[1]; SampleOnePhaseResource res = new SampleOnePhaseResource(); obj[XAResourceRecord.XACONNECTION] = rc; XAOnePhaseResource xares = new XAOnePhaseResource(res, new XidImple(new Uid()), obj); OutputObjectState os = new OutputObjectState(); xares.pack(os); InputObjectState is = new InputObjectState(os); xares.unpack(is); }