func TestHandle(t *testing.T) { … } func TestRecognizers(t *testing.T) { … } func testRecognizer(t *testing.T, cases []func(b *csrBuilder), recognizeFunc func(csr *capi.CertificateSigningRequest, x509cr *x509.CertificateRequest) bool, shouldRecognize bool) { … } var insecureRand … func makeTestCsr() *capi.CertificateSigningRequest { … } type csrBuilder … func makeFancyTestCsr(b csrBuilder) *capi.CertificateSigningRequest { … }