func EqualResp(t *testing.T, expected Response, rec *httptest.ResponseRecorder) {
	require.Equal(t, expected.Code, rec.Code)
	require.Equal(t, expected.Body, rec.Body.String())
	require.Equal(t, expected.Header, rec.HeaderMap)
}
EqualResp expect response
package echotest
import (
	"net/http"
	"net/http/httptest"
	"strings"
	"testing"
	"github.com/labstack/echo/v4"
	"github.com/stretchr/testify/require"
)
func Do(handler echo.HandlerFunc, req *http.Request, urlParams map[string]string) (rec *httptest.ResponseRecorder, err error) {
	rec = httptest.NewRecorder()
	e := echo.New()
	ctx := e.NewContext(req, rec)
	if urlParams != nil {
		var keys []string
		var values []string
		for key, value := range urlParams {
			keys = append(keys, key)
			values = append(values, value)
		}
		ctx.SetParamNames(keys...)
		ctx.SetParamValues(values...)
	}
	err = handler(ctx)
	return
}