@Test
public void testGetRemoteAddress() {

  // GIVEN
  HttpServletRequest mockedRequest = createMock(HttpServletRequest.class);
  expect(mockedRequest.getHeader("X-Forwarded-For")).andReturn(null);
  expect(mockedRequest.getHeader("Proxy-Client-IP")).andReturn("unknown");
  expect(mockedRequest.getHeader("WL-Proxy-Client-IP")).andReturn("");
  expect(mockedRequest.getHeader("HTTP_CLIENT_IP")).andReturn("unknown");
  expect(mockedRequest.getHeader("HTTP_X_FORWARDED_FOR")).andReturn(REMOTE_ADDRESS);
  replay(mockedRequest);
  // WHEN
  String remoteAddress = RequestUtils.getRemoteAddress(mockedRequest);
  // THEN
  assertEquals(REMOTE_ADDRESS, remoteAddress);
  verify(mockedRequest);
}