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: rule_test.go
    path of file: ./repos/oathkeeper/rule
    
    the code of the file until where you have to start completion: // Copyright Â© 2023 Ory Corp
// SPDX-License-Identifier: Apache-2.0

package rule

import (
	"encoding/json"
	"net/url"
	"strconv"
	"testing"

	"github.com/stre
    
func TestRuleWithCustomMethod(t *testing.T) {
	r := &Rule{
		Match: &Match{
			Methods: []string{"CUSTOM"},
			URL:     "https://localhost/users/<(?!admin).*>",
		},
	}

	var tests = []struct {
		method        string
		url           string
		expectedMatch bool
		expectedErr   error
	}{
		{
			method:        "CUSTOM",
			url:           "https://localhost/users/manager",
			expectedMatch: true,
			expectedErr:   nil,
		},
		{
			method:        "CUSTOM",
			url:           "https://localhost/users/1234?key=value&key1=value1",
			expectedMatch: true,
			expectedErr:   nil,
		},
		{
			method:        "DELETE",
			url:           "https://localhost/users/admin",
			expectedMatch: false,
			expectedErr:   nil,
		},
	}
	for ind, tcase := range tests {
		t.Run(strconv.FormatInt(int64(ind), 10), func(t *testing.T) {
			matched, err := r.IsMatching(configuration.Regexp, tcase.method, mustParse(t, tcase.url), ProtocolHTTP)
			assert.Equal(t, tcase.expectedMatch, matched)
			assert.Equal(t, tcase.expectedErr, err)
		})
	}
}