### Question:
RMAuditLogger { static void start(Keys key, String value, StringBuilder b) { b.append(key.name()).append(AuditConstants.KEY_VAL_SEPARATOR).append(value); }  static void logSuccess(String user, String operation, String target, 
      ApplicationId appId, ContainerId containerId); static void logSuccess(String user, String operation, String target, 
      ApplicationId appId, ApplicationAttemptId attemptId); static void logSuccess(String user, String operation, String target,
      ApplicationId appId); static void logSuccess(String user, String operation, String target); static void logFailure(String user, String operation, String perm,
      String target, String description, ApplicationId appId, 
      ContainerId containerId); static void logFailure(String user, String operation, String perm,
      String target, String description, ApplicationId appId, 
      ApplicationAttemptId attemptId); static void logFailure(String user, String operation, String perm,
      String target, String description, ApplicationId appId); static void logFailure(String user, String operation, String perm,
      String target, String description);  }### Answer:
@Test public void testRMAuditLoggerWithIP() throws Exception { Configuration conf = new Configuration(); Server server = RPC.getServer(TestProtocol.class, new MyTestRPCServer(), "0.0.0.0", 0, 5, true, conf, null); server.start(); InetSocketAddress addr = NetUtils.getConnectAddress(server); TestProtocol proxy = (TestProtocol)RPC.getProxy(TestProtocol.class, TestProtocol.versionID, addr, conf); proxy.ping(); server.stop(); }
@Test public void testRMAuditLoggerWithIP() throws Exception { Configuration conf = new Configuration(); Server server = RPC.getServer(new MyTestRPCServer(), "0.0.0.0", 0, conf); server.start(); InetSocketAddress addr = NetUtils.getConnectAddress(server); TestProtocol proxy = (TestProtocol)RPC.getProxy(TestProtocol.class, TestProtocol.versionID, addr, conf); proxy.ping(); server.stop(); }