- /**
- * This test method invokes and executes the remote rpc.
- */
- @Test
- public void testInvokeRpcWithNullInput() throws Exception {
- final ContainerNode rpcOutput = makeRPCOutput("bar");
- final DOMRpcResult rpcResult = new DefaultDOMRpcResult(rpcOutput);
-
- @SuppressWarnings({"unchecked", "rawtypes"})
- final ArgumentCaptor<NormalizedNode<?, ?>> inputCaptor =
- (ArgumentCaptor) ArgumentCaptor.forClass(NormalizedNode.class);
-
- when(domRpcService2.invokeRpc(eq(TEST_RPC_TYPE), inputCaptor.capture())).thenReturn(
- FluentFutures.immediateFluentFuture(rpcResult));
-
- ListenableFuture<DOMRpcResult> frontEndFuture = remoteRpcImpl1.invokeRpc(TEST_RPC_ID, null);
- assertTrue(frontEndFuture instanceof RemoteDOMRpcFuture);
-
- final DOMRpcResult result = frontEndFuture.get(5, TimeUnit.SECONDS);
- assertEquals(rpcOutput, result.getResult());
- }
-