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: paths_test.go
    path of file: ./repos/encore/v2/internals/resourcepaths
    
    the code of the file until where you have to start completion: package resourcepaths

import (
	"context"
	"go/token"
	"testing"

	qt "github.com/frankban/quicktest"

	"encr.dev/pkg/errinsrc"
	"encr.dev/v2/internals/perr"
	"encr.dev/v2/internals/schema"
)

func init() {
	errinsrc.ColoursInErrors(false)
}

func TestParseURL(t *testing.T) {
	c := qt.New(t)

	str := schema.String
	tests := []struct {
		Path string
		Want []Segment
		Err  string
	}{
		{"foo", nil, "Paths must always start with a '/'"},
		{"/foo", []Segment{{Literal, "foo", str, 0, 3}}, ""},
		{"/foo/", nil, "Pa
    
func TestAdd(t *testing.T) {
	c := qt.New(t)

	paths := []struct {
		Method string
		Path   string
		Err    string
	}{
		{"POST", "/foo", ``},
		{"POST", "/foo", `Duplicate Paths found.`},
		{"GET", "/foo", ``},
		{"*", "/foo", `Duplicate Paths found.`},
		{"*", "/bar", ``},
		{"PATCH", "/bar", `Duplicate Paths found.`},
		{"POST", "/foo/bar", ``},
		{"POST", "/foo/:bar", "The path segment `bar` conflicts with the path `/foo/bar`"},
		{"POST", "/moo/:bar", ``},
		{"POST", "/moo/:baz", `Duplicate Paths found.`},
		{"POST", "/moo/:baz/test", ``},
		{"POST", "/moo/:baa/*wild", "The wildcard `*wild` conflicts with the path `/moo/:baz/test`."},
		{"GET", "/moo/:baa/*wild", ``},
		{"POST", "/test/*wild", ``},
		{"POST", "/test/*card", "The wildcard `*card` conflicts with the path `/test/*wild`."},
		{"POST", "/test/!fallback", ""},
		{"GET", "/test/!fallback", ""},
		{"POST", "/test/!fallback", "The fallback `!fallback` conflicts with the path `/test/!fallback`."},
	}

	set := &Set{}

	for _, test := range paths {
		errs := perr.NewList(context.Background(), token.NewFileSet())
		p, ok := Parse(errs, 0, test.Path, Options{
			AllowWildcard: true,
			AllowFallback: true,
			PrefixSlash:   true,
		})
		c.Assert(ok, qt.IsTrue)
		ok = set.Add(errs, test.Method, p)
		if test.Err != "" {
			c.Assert(errs.FormatErrors(), qt.Contains, test.Err, qt.Commentf("%s %s", test.Method, test.Path))
			c.Assert(ok, qt.IsFalse)
		} else {
			c.Assert(errs.Len(), qt.Equals, 0, qt.Commentf("%s %s: %v", test.Method, test.Path, errs.AsError()))
			c.Assert(ok, qt.IsTrue)
		}
	}
}