def METHOD_NAME(self):
    # Mock load Kubernetes config.
    patcher = patch('pkg.earlystopping.v1beta1.medianstop.service.config.load_kube_config')
    self.mock_sum = patcher.start()
    self.addCleanup(patcher.stop)
    servicers = {
        api_pb2.DESCRIPTOR.services_by_name['EarlyStopping']: MedianStopService(
        )
    }
    self.test_server = grpc_testing.server_from_dictionary(
        servicers, grpc_testing.strict_real_time())