|
@@ -15,12 +15,14 @@
|
|
|
*/
|
|
|
package org.springframework.security.web.authentication.session;
|
|
|
|
|
|
-import org.junit.Assert;
|
|
|
import org.junit.Test;
|
|
|
import org.junit.runner.RunWith;
|
|
|
import org.powermock.modules.junit4.PowerMockRunner;
|
|
|
+
|
|
|
import org.springframework.mock.web.MockHttpServletRequest;
|
|
|
|
|
|
+import static org.assertj.core.api.Assertions.assertThat;
|
|
|
+
|
|
|
/**
|
|
|
* @author Rob Winch
|
|
|
*
|
|
@@ -32,9 +34,7 @@ public class ChangeSessionIdAuthenticationStrategyTests {
|
|
|
public void applySessionFixation() {
|
|
|
MockHttpServletRequest request = new MockHttpServletRequest();
|
|
|
String id = request.getSession().getId();
|
|
|
-
|
|
|
- new ChangeSessionIdAuthenticationStrategy().applySessionFixation(request);
|
|
|
-
|
|
|
- Assert.assertNotEquals(id, request.getSession().getId());
|
|
|
+ new ChangeSessionIdAuthenticationStrategy().applySessionFixation(request);
|
|
|
+ assertThat(request.getSession().getId()).isNotEqualTo(id);
|
|
|
}
|
|
|
}
|