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: attributes_test.go
    path of file: ./repos/permify/internal/storage/context
    
    the code of the file until where you have to start completion: package context

import (
	"testing"

	base "github.com/Permify/permify/pkg/pb/base/v1"
)

func TestQueryAttributes1(t *testing.T) {
	attributes := []*base.Attribute{
		{Entity: &base.Entity{Type: "type1", Id: "1"}, Attribute: "attribute1", Value: nil},
		{Entity: &base.Entity{Type: "type3", Id: "3"}, Attribute: "attribute2", Value: nil},
		{Entity: &base.Entity{Type: "type5", Id: "5"}, Attribute: "attribute3", Value: nil},
	}

	contextualAttributes := NewContextualAttributes(attributes...)
	filter := &base.AttributeFilter{Entity: &base.EntityFi
    
func TestQueryAttributes3(t *testing.T) {
	attributes := []*base.Attribute{
		{Entity: &base.Entity{Type: "type1", Id: "1"}, Attribute: "attribute1", Value: nil},
		{Entity: &base.Entity{Type: "type3", Id: "3"}, Attribute: "attribute2", Value: nil},
		{Entity: &base.Entity{Type: "type5", Id: "5"}, Attribute: "attribute3", Value: nil},
	}

	contextualAttributes := NewContextualAttributes(attributes...)
	filter := &base.AttributeFilter{Entity: &base.EntityFilter{Type: "type3", Ids: []string{"3"}}, Attributes: []string{"attribute1", "attribute2"}}

	attr, err := contextualAttributes.QuerySingleAttribute(filter)
	if err != nil {
		t.Errorf("Unexpected error: %v", err)
	}

	if attr.Entity.Type != "type3" || attr.Entity.Id != "3" || attr.Attribute != "attribute2" {
		t.Errorf("Unexpected attribute: %+v", attr)
	}
}