public async Task JobsClient_Destroy_HappyPath() { var connection = new Mock <IConnection>(); connection.Setup(c => c.Post(ApiUrls.JobsDestroy("j123abc"), null, null)) .Returns(() => { return(Task.CompletedTask); }); var logsConnection = new Mock <IConnection>(); var jobsClient = new JobsClient(connection.Object, logsConnection.Object); await jobsClient.Destroy("j123abc"); connection.Verify( c => c.Post(ApiUrls.JobsDestroy("j123abc"), null, null), Times.Exactly(1) ); }