// Helper method used by JUnit tests to pass in an operation and method argument // When the AMF call returns, CallResultHandler.onResult is called to Assert things. private void internalTestCall(String operation, Object methodArg, CallResultHandler resultHandler) throws ClientStatusException, ServerStatusException { AMFConnection amfConnection = new AMFConnection(); // Connect. amfConnection.connect(DEFAULT_URL); // Make a remoting call and retrieve the result. Object result; if (methodArg == null) result = amfConnection.call(operation); else result = amfConnection.call(operation, methodArg); resultHandler.onResult(result); amfConnection.close(); }