use of org.springframework.messaging.simp.stomp.StompHeaderAccessor in project spring-framework by spring-projects.
the class StompSubProtocolHandlerTests method handleMessageToClientWithConnectedFrame.
@Test
public void handleMessageToClientWithConnectedFrame() {
StompHeaderAccessor headers = StompHeaderAccessor.create(StompCommand.CONNECTED);
Message<byte[]> message = MessageBuilder.createMessage(EMPTY_PAYLOAD, headers.getMessageHeaders());
this.protocolHandler.handleMessageToClient(this.session, message);
assertEquals(1, this.session.getSentMessages().size());
WebSocketMessage<?> textMessage = this.session.getSentMessages().get(0);
assertEquals("CONNECTED\n" + "user-name:joe\n" + "\n" + "