final Oid oid = adapter.getOid();
final DummyIdentityData identityData =
new DummyIdentityData(oid, TestProxyAdapter.class.getName(), new TestProxyVersion(1));
// return results
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[1])), with(equalTo(new ObjectData[0])));
will(returnValue(results));
}
});
// don't start xactn here, since within call.
final ExecuteClientActionRequest request =
new ExecuteClientActionRequest(new TestProxySession(), new ReferenceData[] { identityData },
new int[] { ClientTransactionEvent.DELETE });
final ExecuteClientActionResponse result = server.executeClientAction(request);
assertEquals(results, result);
}