}
public void testUpdateServerWhenRequestHashDiffersFromServerSideHash() throws Exception {
final int port = SystemInstance.get().getOptions().get("ejbd.port", 4201);
final URI[] locations = new URI[]{new URI("ejbd://localhost:" + port)};
final ServerMetaData server = new ServerMetaData(locations);
beanContext.setContainer(clusteredContainer);
request.getServerHash();
modify().returnValue(server.buildHash() + 1);
response.setServer(null);
modify().args(new AbstractExpression() {
@Override
public void describeWith(final ExpressionDescriber arg0) throws IOException {
}
@Override
public boolean passes(final Object arg0) {
final ServerMetaData actualServer = (ServerMetaData) arg0;
assertSame(locations, actualServer.getLocations());
return true;
}
});
clusteredContainer.getLocations(beanContext);