@Test public void testAssembleMessageShouldResolveIpOfRequestToHostName() { given(request.getRemoteAddr()).willReturn("ipAddress"); underTest.assembleMessage(request, message); verify(ipAddressResolver).resolveToHostName("ipAddress"); }
public String assembleMessage(HttpServletRequest request, String message) { String ip = request.getRemoteAddr(); String host = ipAddressResolver.resolveToHostName(ip); return String.format(INFO_TEMPLATE, request.getRequestURI(), host, message); }
UrlAccessLogMessageAssembler { public String assembleMessage(HttpServletRequest request, String message) { String ip = request.getRemoteAddr(); String host = ipAddressResolver.resolveToHostName(ip); return String.format(INFO_TEMPLATE, request.getRequestURI(), host, message); } }
UrlAccessLogMessageAssembler { public String assembleMessage(HttpServletRequest request, String message) { String ip = request.getRemoteAddr(); String host = ipAddressResolver.resolveToHostName(ip); return String.format(INFO_TEMPLATE, request.getRequestURI(), host, message); }  }
UrlAccessLogMessageAssembler { public String assembleMessage(HttpServletRequest request, String message) { String ip = request.getRemoteAddr(); String host = ipAddressResolver.resolveToHostName(ip); return String.format(INFO_TEMPLATE, request.getRequestURI(), host, message); }  String assembleMessage(HttpServletRequest request, String message); String assembleDenyMessage(HttpServletRequest request); }
UrlAccessLogMessageAssembler { public String assembleMessage(HttpServletRequest request, String message) { String ip = request.getRemoteAddr(); String host = ipAddressResolver.resolveToHostName(ip); return String.format(INFO_TEMPLATE, request.getRequestURI(), host, message); }  String assembleMessage(HttpServletRequest request, String message); String assembleDenyMessage(HttpServletRequest request);  }