### Question:
RuntimeData { public RuntimeData(Object o) { if (o instanceof HttpServletRequest) { address = ((HttpServletRequest) o).getRemoteAddr(); } else if (o instanceof ServerCall) { try { address = ((ServerCall) o).getAttributes().get(Grpc.TRANSPORT_ATTR_REMOTE_ADDR).toString(); } catch (Exception npe) { logger.warn("the address get from the runtime data is a null value unexpected."); } } if (address == null) { logger.warn("assign the address with an empty string."); address = ""; } } RuntimeData(Object o); String getRemoteAddr();  }### Answer:
@Test public void testRuntimeData() { HttpServletRequest request = Mockito.mock(HttpServletRequest.class); RuntimeData data = new RuntimeData(request); Assert.assertTrue("".equals(data.getRemoteAddr())); ServerCall object = Mockito.mock(ServerCall.class); RuntimeData data1 = new RuntimeData(object); Assert.assertTrue("".equals(data1.getRemoteAddr())); Object o = new Object(); RuntimeData data2 = new RuntimeData(o); Assert.assertTrue("".equals(data2.getRemoteAddr())); }