@Test
public void testGetRemoteAddressWhenHeadersAreMissing() {

  // GIVEN
  HttpServletRequest mockedRequest = createMock(HttpServletRequest.class);
  expect(mockedRequest.getHeader(anyString())).andReturn(null).times(5);
  expect(mockedRequest.getRemoteAddr()).andReturn(REMOTE_ADDRESS);
  replay(mockedRequest);
  // WHEN
  String remoteAddress = RequestUtils.getRemoteAddress(mockedRequest);
  // THEN
  assertEquals(REMOTE_ADDRESS, remoteAddress);
  verify(mockedRequest);
}