You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: network_test.go
    path of file: ./repos/rudder-server/router
    
    the code of the file until where you have to start completion: package router

import (
	"bytes"
	"compress/gzip"
	"context"
	"fmt"
	"io"
	"net/http"
	"net/http/httptest"
	"testing"

	"github.com/golang/mock/gomock"
	. "github.com/onsi/ginkgo/v2"
	. "github.com/onsi/gomega"
	"github.com/stretchr/testify/require"

	"github.com/rudderlabs/rudder-go-kit/logger"
	mocksSysUtils "github.com/rudderlabs/rudder-server/mocks/utils/sysUtils"
	"github.com/rudderlabs/rudder-server/processor/integrations"
)

type networkContext struct {
	mockCtrl       *gomock.Controller
	mockHTTPClient *mocksSysUtils.MockHTTPClientI
}

// Initialize mocks and common expectations
func (c *networkContext) Setup() {
	c.mockCtrl = gomock.NewController(GinkgoT())
	c.mockHTTPClient = mocksSysUtils.NewMockHTTPClientI(c.mockCtrl)
}

func (c *networkContext) Finish() {
	c.mockCtrl.Finish()
}

func TestSendPostWithGzipData(t *testing.T) {
	t.Run("should send Gzip data when payload is valid", func(r *testing.T) {
		testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
			if r.Header.Get("Content-Encoding") != "gzip" {
				w.WriteHeader(http.StatusBadRequest)
				return
			}
			body, err := gzip.NewReader(r.Body)
			if err != nil {
				w.WriteHeader(http.StatusBadRequest)
				return
			}
			defer body.Close()
			buf := new(bytes.Buffer)
			_, _ = buf.ReadFrom(body)
			w.WriteHeader(http.StatusOK)
			_, _ = w.Write(buf.Bytes())
		}))
		network := &netHandle{}
		network.logger = logger.NewLogger().Child("network")
		network.httpClient = http.DefaultClient
		eventData := `[{"event":"Signed Up"}]`
		var structData in
    
func TestSendPostWithGzipData(t *testing.T) {
	t.Run("should send Gzip data when payload is valid", func(r *testing.T) {
		testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
			if r.Header.Get("Content-Encoding") != "gzip" {
				w.WriteHeader(http.StatusBadRequest)
				return
			}
			body, err := gzip.NewReader(r.Body)
			if err != nil {
				w.WriteHeader(http.StatusBadRequest)
				return
			}
			defer body.Close()
			buf := new(bytes.Buffer)
			_, _ = buf.ReadFrom(body)
			w.WriteHeader(http.StatusOK)
			_, _ = w.Write(buf.Bytes())
		}))
		network := &netHandle{}
		network.logger = logger.NewLogger().Child("network")
		network.httpClient = http.DefaultClient
		eventData := `[{"event":"Signed Up"}]`
		var structData integrations.PostParametersT
		structData.RequestMethod = "POST"
		structData.Type = "REST"
		structData.URL = testServer.URL
		structData.UserID = "anon_id"
		structData.Body = map[string]interface{}{
			"GZIP": map[string]interface{}{
				"payload": eventData,
			},
		}

		resp := network.SendPost(context.Background(), structData)
		require.Equal(r, resp.StatusCode, http.StatusOK)
		require.Equal(r, string(resp.ResponseBody), eventData)
	})

	t.Run("should fail to send Gzip data when payload is missing", func(r *testing.T) {
		network := &netHandle{}
		network.logger = logger.NewLogger().Child("network")
		network.httpClient = http.DefaultClient
		eventData := `[{"event":"Signed Up"}]`
		var structData integrations.PostParametersT
		structData.RequestMethod = "POST"
		structData.Type = "REST"
		structData.UserID = "anon_id"
		structData.Body = map[string]interface{}{
			"GZIP": map[string]interface{}{
				"abc": eventData,
			},
		}

		resp := network.SendPost(context.Background(), structData)
		require.Equal(r, resp.StatusCode, http.StatusBadRequest)
		require.Equal(r, resp.ResponseBody, []byte("400 Unable to parse json list. Unexpected transformer response"))
	})
}