@Test
public void fallbackToRemoteAddress() throws Exception {

  underTest.doFilter(request, response, chain);
  verify(chain).doFilter(captor.capture(), eq(response));
  HttpServletRequest captured = captor.getValue();
  when(request.getRemoteAddr()).thenReturn("4.3.2.1");
  assertThat(captured.getRemoteAddr(), is("4.3.2.1"));
}