BindingDOMRpcAdapterRegistration extends AbstractObjectRegistration<T> { @Override protected void removeRegistration() { reg.close(); } BindingDOMRpcAdapterRegistration(T instance, DOMRpcImplementationRegistration<?> reg);   }
@Test public void removeRegistration() { final DOMRpcImplementationRegistration<?> registration = mock(DOMRpcImplementationRegistration.class); final BindingDOMRpcAdapterRegistration<?> adapterReg = new BindingDOMRpcAdapterRegistration<>(mock(RpcService.class), registration); adapterReg.close(); verify(registration).close(); }