private void checkServerOperationResolver(MockOperationContext context, ModelNode operation, PathAddress address, boolean expectServerOps) {
Map<String, ProxyController> serverProxies = new HashMap<String, ProxyController>();
serverProxies.put("server-one", new MockServerProxy());
serverProxies.put("server-two", new MockServerProxy());
serverProxies.put("server-three", new MockServerProxy());
ServerOperationResolver resolver = new ServerOperationResolver("localhost", serverProxies);
final Resource backup = context.root;
context.root = getServerResolutionResource();
try {
Map<Set<ServerIdentity>, ModelNode> serverOps = resolver.getServerOperations(context, operation, address);
if (expectServerOps) {
Assert.assertEquals(1, serverOps.size());
Set<ServerIdentity> ids = serverOps.entrySet().iterator().next().getKey();
Assert.assertEquals(1, ids.size());