public void CreateNotificationChannel() { Mock <NotificationChannelService.NotificationChannelServiceClient> mockGrpcClient = new Mock <NotificationChannelService.NotificationChannelServiceClient>(MockBehavior.Strict); CreateNotificationChannelRequest expectedRequest = new CreateNotificationChannelRequest { ProjectName = new ProjectName("[PROJECT]"), NotificationChannel = new NotificationChannel(), }; NotificationChannel expectedResponse = new NotificationChannel { Type = "type3575610", Name = "name2-1052831874", DisplayName = "displayName1615086568", Description = "description-1724546052", }; mockGrpcClient.Setup(x => x.CreateNotificationChannel(expectedRequest, It.IsAny <CallOptions>())) .Returns(expectedResponse); NotificationChannelServiceClient client = new NotificationChannelServiceClientImpl(mockGrpcClient.Object, null); ProjectName name = new ProjectName("[PROJECT]"); NotificationChannel notificationChannel = new NotificationChannel(); NotificationChannel response = client.CreateNotificationChannel(name, notificationChannel); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }