@Test  
public void testRMAuditLoggerWithIP() throws Exception {

  Configuration conf = new Configuration();
  RPC.setProtocolEngine(conf, TestRpcService.class,
      ProtobufRpcEngine2.class);
  // Create server side implementation
  MyTestRPCServer serverImpl = new MyTestRPCServer();
  BlockingService service = TestRpcServiceProtos.TestProtobufRpcProto
      .newReflectiveBlockingService(serverImpl);
  // start the IPC server
  Server server = new RPC.Builder(conf)
      .setProtocol(TestRpcService.class)
      .setInstance(service).setBindAddress("0.0.0.0")
      .setPort(0).setNumHandlers(5).setVerbose(true).build();
  server.start();
  InetSocketAddress addr = NetUtils.getConnectAddress(server);
  // Make a client connection and test the audit log
  TestRpcService proxy = RPC.getProxy(TestRpcService.class,
      TestProtocol.versionID, addr, conf);
  // Start the testcase
  TestProtos.EmptyRequestProto pingRequest =
      TestProtos.EmptyRequestProto.newBuilder().build();
  proxy.ping(null, pingRequest);
  server.stop();
  RPC.stopProxy(proxy);
}