@Test
public void testStopProxy() throws IOException {

  RPC.setProtocolEngine(conf,
      StoppedProtocol.class, StoppedRpcEngine.class);
  StoppedProtocol proxy = RPC.getProxy(StoppedProtocol.class,
      StoppedProtocol.versionID, null, conf);
  StoppedInvocationHandler invocationHandler = (StoppedInvocationHandler)
      Proxy.getInvocationHandler(proxy);
  assertEquals(0, invocationHandler.getCloseCalled());
  RPC.stopProxy(proxy);
  assertEquals(1, invocationHandler.getCloseCalled());
}