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: static_test.go
    path of file: ./repos/lura/proxy
    
    the code of the file until where you have to start completion: // SPDX-License-Identifier: Apache-2.0

package proxy

import (
	"context"
	"errors"
	"reflect"
	"testing"

	"github.com/luraproject/lura/v2/config"
	"github.com/luraproject/lura/v2/logging"
)

func TestNewStaticMiddleware_ok(t *testing.T) {
	endpoint := config.EndpointConfig{
		ExtraConfig: config.ExtraConfig{
			Namespace: map[string]interface{}{
				staticKey: map[string]interface{}{
					"data": map[string]interface{}{
						"new-1": true,
						"new-2": map[string]interface{}{"k1": 42},
						"new-3": "42",
					},
					"strategy": "incomplete",
				},
			},
		},
	}
	mw := NewStaticMiddleware(logging.NoOp, &endpoint)

	p := mw(dummyProxy(&Response{Data: map[string]interface{}{"supu": 42}, IsComplete: true}))
	out1, err := p(context.Background(), &Request{})
	if err != nil {
		t.Errorf("The middleware propagated an unexpected error: %s", err.Error())
	}
	if out1 == nil {
		t.Error("The proxy returned a null result")
		return
	}
	if len(out1.Data) != 1 {
		t.Errorf("We weren't expecting an extra partial response but we got %v!", out1)
	}
	if !out1.IsComplete {
		t.Errorf("We were expecting a completed response but we got an incompleted one!")
	}

	p = mw(dummyProxy(&Respon
    
func TestNewStaticMiddleware_ok(t *testing.T) {
	endpoint := config.EndpointConfig{
		ExtraConfig: config.ExtraConfig{
			Namespace: map[string]interface{}{
				staticKey: map[string]interface{}{
					"data": map[string]interface{}{
						"new-1": true,
						"new-2": map[string]interface{}{"k1": 42},
						"new-3": "42",
					},
					"strategy": "incomplete",
				},
			},
		},
	}
	mw := NewStaticMiddleware(logging.NoOp, &endpoint)

	p := mw(dummyProxy(&Response{Data: map[string]interface{}{"supu": 42}, IsComplete: true}))
	out1, err := p(context.Background(), &Request{})
	if err != nil {
		t.Errorf("The middleware propagated an unexpected error: %s", err.Error())
	}
	if out1 == nil {
		t.Error("The proxy returned a null result")
		return
	}
	if len(out1.Data) != 1 {
		t.Errorf("We weren't expecting an extra partial response but we got %v!", out1)
	}
	if !out1.IsComplete {
		t.Errorf("We were expecting a completed response but we got an incompleted one!")
	}

	p = mw(dummyProxy(&Response{Data: map[string]interface{}{"supu": 42}}))
	out2, err := p(context.Background(), &Request{})
	if err != nil {
		t.Errorf("The middleware propagated an unexpected error: %s", err.Error())
	}
	if out2 == nil {
		t.Error("The proxy returned a null result")
		return
	}
	if len(out2.Data) != 4 {
		t.Errorf("We weren't expecting a partial response but we got %v!", out2)
	}

	expectedError := errors.New("expect me")
	p = mw(func(_ context.Context, _ *Request) (*Response, error) {
		return nil, expectedError
	})
	out3, err := p(context.Background(), &Request{})
	if err != expectedError {
		t.Errorf("The middleware propagated an unexpected error: %s", err)
	}
	if out3 == nil {
		t.Error("The proxy returned a null result")
		return
	}
	if len(out3.Data) != 3 {
		t.Errorf("We weren't expecting a partial response but we got %v!", out3)
	}
}