const version … func TestGRPCService(t *testing.T) { … } func newClient(t *testing.T, address string) kmsapi.KeyManagementServiceClient { … } type testService … var _ … func (s *testService) Decrypt(ctx context.Context, uid string, req *DecryptRequest) ([]byte, error) { … } func (s *testService) Encrypt(ctx context.Context, uid string, data []byte) (*EncryptResponse, error) { … } func (s *testService) Status(ctx context.Context) (*StatusResponse, error) { … } func makeID(rand func([]byte) (int, error)) (string, error) { … } func newBase64Service(keyID string) *testService { … }