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: common_test.go
    path of file: ./repos/beam/sdks/go/pkg/beam/io/fhirio
    
    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 compli
    
func TestParseOperationCounterResultsFrom(t *testing.T) {
	testCases := []struct {
		name              string
		operationMetadata string
		expectedResult    operationResults
		expectedError     bool
	}{
		{
			name:              "Error bad json",
			operationMetadata: "bad json",
			expectedResult:    operationResults{},
			expectedError:     true,
		},
		{
			name:              "Success with 1 counter set",
			operationMetadata: `{"counter":{"success":"4"}}`,
			expectedResult:    operationResults{Successes: 4, Failures: 0},
			expectedError:     false,
		},
		{
			name:              "Success with both counters set",
			operationMetadata: `{"counter":{"success":"1","failure": "3"}}`,
			expectedResult:    operationResults{Successes: 1, Failures: 3},
			expectedError:     false,
		},
		{
			name:              "Success with no counters set",
			operationMetadata: `{"counter":{}}`,
			expectedResult:    operationResults{Successes: 0, Failures: 0},
			expectedError:     false,
		},
	}

	for _, testCase := range testCases {
		t.Run(testCase.name, func(t *testing.T) {
			operationResult, err := parseOperationCounterResultsFrom([]byte(testCase.operationMetadata))
			if err != nil && !testCase.expectedError {
				t.Fatalf("Got unexpected error [%v]", err)
			}
			if !cmp.Equal(operationResult, testCase.expectedResult) {
				t.Fatalf("operationResult got %v, expected %v", operationResult, testCase.expectedResult)
			}
		})
	}
}