}
});
// results returned in their own container
final ExecuteClientActionResponse results = new ExecuteClientActionResponse(new ObjectData[0], new Version[0], null);
mockery.checking(new Expectations() {
{
one(mockEncoder).encodeClientActionResult(with(equalTo(new ReferenceData[1])), with(equalTo(new Version[] { new TestProxyVersion(2) })), with(equalTo(new ObjectData[0])));
will(returnValue(results));
}
});
final ExecuteClientActionRequest request = new ExecuteClientActionRequest(session, new ReferenceData[] { data }, new int[] { ClientTransactionEvent.CHANGE });
// don't start xactn here, since within call.
final ExecuteClientActionResponse result = server.executeClientAction(request);
final ObjectAdapter object = IsisContext.getPersistenceSession().loadObject(adapter.getOid(), adapter.getSpecification());
assertEquals(new TestProxyVersion(2), object.getVersion());
assertEquals(results, result);