title: Create unit test for WS in golang using Echo router
body: <p>I use gorilla/websocket for ws and labstack/echo as router. I need to create unit test for the handler. I find topic with solving this problem with default go router, but i don't understand how to use it with echo.
  I have this:</p>
  <pre><code>func TestWS(t *testing.T){
      provider := handler.New(coordinateservice.New())
  
      e := echo.New()
      rec := httptest.NewRecorder()
  
      req := httptest.NewRequest(http.MethodGet, &quot;/admin/orders/:id/details&quot;, nil)
  
      c := e.NewContext(req, rec)
  
      c.SetPath(&quot;/admin/orders/:id/details&quot;)
      c.SetParamNames(&quot;id&quot;)
      c.SetParamValues(&quot;9999&quot;)
  
      if assert.NoError(t, provider.OrderHandler.OpenWs(c)) {
          assert.Equal(t, http.StatusOK, rec.Code)
      }
  
      u := url.URL{Scheme: &quot;ws&quot;, Host: &quot;127.0.0.1&quot;, Path: &quot;/admin/orders/9999/details&quot;}
  
      fmt.Println(u.String())
  
      // Connect to the server
      ws, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
      if err != nil {
          t.Fatalf(&quot;%v&quot;, err)
      }
      defer ws.Close()
  
      _, p, err := ws.ReadMessage()
      if err != nil {
          t.Fatalf(&quot;%v&quot;, err)
      }
  
      fmt.Println(string(p))
  }
  </code></pre>
  <p>And error <code>websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header</code> in this line:</p>
  <pre><code>    ws, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
      if err != nil {
          t.Fatalf(&quot;%v&quot;, err)
      }
  </code></pre>
  <p>What i need to do for connecting ws to the echo handler?</p>