@Test
  public void defaultTransportHandlersWithOverride() {
    XhrReceivingTransportHandler xhrHandler = new XhrReceivingTransportHandler();

    DefaultSockJsService service = new DefaultSockJsService(mock(TaskScheduler.class), xhrHandler);
    Map<TransportType, TransportHandler> handlers = service.getTransportHandlers();

    assertEquals(8, handlers.size());
    assertSame(xhrHandler, handlers.get(xhrHandler.getTransportType()));
  }
  @Test
  public void defaultTransportHandlers() {
    DefaultSockJsService service = new DefaultSockJsService(mock(TaskScheduler.class));
    Map<TransportType, TransportHandler> handlers = service.getTransportHandlers();

    assertEquals(8, handlers.size());
    assertNotNull(handlers.get(TransportType.WEBSOCKET));
    assertNotNull(handlers.get(TransportType.XHR));
    assertNotNull(handlers.get(TransportType.XHR_SEND));
    assertNotNull(handlers.get(TransportType.XHR_STREAMING));
    assertNotNull(handlers.get(TransportType.JSONP));
    assertNotNull(handlers.get(TransportType.JSONP_SEND));
    assertNotNull(handlers.get(TransportType.HTML_FILE));
    assertNotNull(handlers.get(TransportType.EVENT_SOURCE));
  }