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: read_test.go
    path of file: ./repos/beam/sdks/go/pkg/beam/io/mongodbio
    
    the code of the file until where you have to start completion: // Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements.  See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License.  You may obtain a copy of the License at
//
//    http://www.ap
    
func Test_inferProjection(t *testing.T) {
	type doc struct {
		Field1 string `bson:"field1"`
		Field2 string `bson:"field2"`
		Field3 string `bson:"-"`
	}

	tests := []struct {
		name   string
		t      reflect.Type
		tagKey string
		want   bson.D
	}{
		{
			name:   "Infer projection from struct bson tags",
			t:      reflect.TypeOf(doc{}),
			tagKey: "bson",
			want: bson.D{
				{Key: "field1", Value: 1},
				{Key: "field2", Value: 1},
			},
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			if got := inferProjection(tt.t, tt.tagKey); !cmp.Equal(got, tt.want) {
				t.Errorf("inferProjection() = %v, want %v", got, tt.want)
			}
		})
	}
}