ActionServiceAdapter extends AbstractBindingLoadingAdapter<DOMActionService, Class<? extends Action<?, ?, ?>>, ActionAdapter> implements ActionService { @Override public <O extends DataObject, T extends Action<?, ?, ?>> T getActionHandle(final Class<T> actionInterface, final Set<DataTreeIdentifier<O>> nodes) { return !nodes.isEmpty() ? (T) new ConstrainedAction(getActionHandle(actionInterface, ImmutableSet.of()), nodes) : (T) Proxy.newProxyInstance(actionInterface.getClassLoader(), new Class[] { actionInterface }, getAdapter(actionInterface)); } ActionServiceAdapter(final AdapterContext adapterContext, final DOMActionService delegate); @Override T getActionHandle(final Class<T> actionInterface,
            final Set<DataTreeIdentifier<O>> nodes);  }
@Test public void testInvocation() throws ExecutionException { final Foo handle = service.getActionHandle(Foo.class, ImmutableSet.of()); final ListenableFuture<RpcResult<Output>> future = handle.invoke(InstanceIdentifier.create(Cont.class), BINDING_FOO_INPUT); assertNotNull(future); assertFalse(future.isDone()); domResult.set(new SimpleDOMActionResult(DOM_FOO_OUTPUT, ImmutableList.of())); final RpcResult<Output> bindingResult = Futures.getDone(future); assertEquals(ImmutableList.of(), bindingResult.getErrors()); assertEquals(BINDING_FOO_OUTPUT, bindingResult.getResult()); }