diff options
Diffstat (limited to 'src/test/java/org/traccar/helper/IpRetrieverTest.java')
-rw-r--r-- | src/test/java/org/traccar/helper/IpRetrieverTest.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/java/org/traccar/helper/IpRetrieverTest.java b/src/test/java/org/traccar/helper/IpRetrieverTest.java index 628b5dd63..63e2c0073 100644 --- a/src/test/java/org/traccar/helper/IpRetrieverTest.java +++ b/src/test/java/org/traccar/helper/IpRetrieverTest.java @@ -16,22 +16,22 @@ public class IpRetrieverTest { private MockHttpServletRequest mockHttpServletRequest; @Before - public void init(){ + public void init() { mockHttpServletRequest = new MockHttpServletRequest(); } @Test - public void testIpBehindReverseProxy(){ + public void testIpBehindReverseProxy() { mockHttpServletRequest.setRemoteAddr(GATEWAY_IP_ADDRESS); - mockHttpServletRequest.addHeader("X-FORWARDED-FOR",IP_ADDRESS_BEHIND_REVERSE_PROXY); + mockHttpServletRequest.addHeader("X-FORWARDED-FOR", IP_ADDRESS_BEHIND_REVERSE_PROXY); assertEquals(NORMAL_IP_ADDRESS, IpRetriever.retrieveIP(mockHttpServletRequest)); } @Test - public void testNormalIp(){ - mockHttpServletRequest.setRemoteAddr(NORMAL_IP_ADDRESS); - assertEquals(NORMAL_IP_ADDRESS, IpRetriever.retrieveIP(mockHttpServletRequest)); + public void testNormalIp() { + mockHttpServletRequest.setRemoteAddr(NORMAL_IP_ADDRESS); + assertEquals(NORMAL_IP_ADDRESS, IpRetriever.retrieveIP(mockHttpServletRequest)); } |