List of usage examples for org.springframework.security.web.authentication WebAuthenticationDetails equals
@Override
public boolean equals(Object obj)
From source file:org.springframework.security.web.jackson2.WebAuthenticationDetailsMixinTest.java
@Test public void buildWebAuthenticationDetailsUsingDifferentConstructors() throws IOException { MockHttpServletRequest request = new MockHttpServletRequest(); request.setRemoteAddr("localhost"); request.setSession(new MockHttpSession(null, "1")); WebAuthenticationDetails details = new WebAuthenticationDetails(request); String jsonString = "{\"@class\": \"org.springframework.security.web.authentication.WebAuthenticationDetails\"," + "\"sessionId\": \"1\", \"remoteAddress\": \"/localhost\"}"; WebAuthenticationDetails authenticationDetails = this.mapper.readValue(jsonString, WebAuthenticationDetails.class); assertThat(details.equals(authenticationDetails)); }