|
@@ -20,23 +20,16 @@ import org.junit.Before;
|
|
|
import org.junit.Test;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
-import org.springframework.context.annotation.Import;
|
|
|
-import org.springframework.core.MethodParameter;
|
|
|
-import org.springframework.http.server.ServerHttpRequest;
|
|
|
-import org.springframework.http.server.ServerHttpResponse;
|
|
|
import org.springframework.messaging.Message;
|
|
|
import org.springframework.messaging.MessageChannel;
|
|
|
import org.springframework.messaging.MessageDeliveryException;
|
|
|
import org.springframework.messaging.handler.annotation.MessageMapping;
|
|
|
-import org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver;
|
|
|
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
|
|
|
import static org.springframework.messaging.simp.SimpMessageType.*;
|
|
|
|
|
|
import org.springframework.messaging.simp.SimpMessageType;
|
|
|
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
|
|
import org.springframework.messaging.support.GenericMessage;
|
|
|
-import org.springframework.mock.web.MockHttpServletRequest;
|
|
|
-import org.springframework.mock.web.MockHttpServletResponse;
|
|
|
import org.springframework.mock.web.MockServletConfig;
|
|
|
import org.springframework.security.access.AccessDeniedException;
|
|
|
import org.springframework.security.authentication.TestingAuthenticationToken;
|
|
@@ -44,25 +37,14 @@ import org.springframework.security.config.annotation.web.messaging.MessageSecur
|
|
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
|
|
import org.springframework.security.web.csrf.CsrfToken;
|
|
|
import org.springframework.security.web.csrf.DefaultCsrfToken;
|
|
|
-import org.springframework.security.web.csrf.MissingCsrfTokenException;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.test.util.ReflectionTestUtils;
|
|
|
-import org.springframework.web.HttpRequestHandler;
|
|
|
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
|
|
|
-import org.springframework.web.servlet.HandlerMapping;
|
|
|
-import org.springframework.web.socket.WebSocketHandler;
|
|
|
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
|
|
|
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
|
|
|
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
|
|
-import org.springframework.web.socket.server.HandshakeFailureException;
|
|
|
-import org.springframework.web.socket.server.HandshakeHandler;
|
|
|
-import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor;
|
|
|
-import org.springframework.web.socket.sockjs.transport.handler.SockJsWebSocketHandler;
|
|
|
-import org.springframework.web.socket.sockjs.transport.session.WebSocketServerSockJsSession;
|
|
|
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
+
|
|
|
import java.util.HashMap;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
import static org.assertj.core.api.Assertions.fail;
|