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: arn_test.go
    path of file: ./repos/aws-sdk-go-v2/service/internal/s3shared/arn
    
    the code of the file until where you have to start completion: package arn

import (
	"reflect"
	"strings"
	"testing"

	"github.com/aws/aws-sdk-go-v2/aws/arn"
)

func TestParseResource(t *testing.T) {
	cases := map[string]struct {
		Input           string
		MappedResources map[string]fu
    
func mappedResourceParser(kinds map[string]func(arn.ARN, []string) (Resource, error)) ResourceParser {
	return func(a arn.ARN) (Resource, error) {
		parts := SplitResource(a.Resource)

		fn, ok := kinds[parts[0]]
		if !ok {
			return nil, InvalidARNError{ARN: a, Reason: "unknown resource type"}
		}
		return fn(a, parts[1:])
	}
}