/*!

@page iam-credentials-mock Testing your Cloud IAM Credentials application with googlemock

This document describes how to test your own Cloud IAM application using the
Cloud IAM C++ client library, [Google Test][googletest-link] and the
[Google Test Mocking Framework][googlemock-link].

### Mocking a Successful IAMCredentialsClient::SignJwt() call

First include the headers for the Cloud IAM Credentials Client, the mocking
class, and the Google Mock framework:

@snippet mock_iam_credentials.cc required-includes

The example uses a number of aliases to save typing and improve readability:

@snippet mock_iam_credentials.cc helper-aliases

Create a mocking object for
`google::cloud::iam_credentials_v1::IAMCredentialsConnection`:

@snippet mock_iam_credentials.cc create-mock

It is customary to first setup the expectations for your mock, and then
write the rest of the code:

@snippet mock_iam_credentials.cc setup-expectations

With the expectations in place, create a
`google::cloud::iam_credentials_v1::IAMCredentialsClient` object:

@snippet mock_iam_credentials.cc create-client

And then make calls on the client as usual:

@snippet mock_iam_credentials.cc client-call

And then verify the results meet your expectations:

@snippet mock_iam_credentials.cc expected-results

### Full Listing

Finally we present the full code for this example:

@snippet mock_iam_credentials.cc all

[googletest-link]: https://github.com/google/googletest
[googlemock-link]: https://github.com/google/googletest/tree/main/googlemock

*/
