code: public static StubTransformer mappedCredentialsStubTransformer(
              final Map<String, CallCredentials> credentialsByName,
              @Nullable final CallCredentials fallback) {
          requireNonNull(credentialsByName, "credentials");
          return (name, stub) -> {
              final CallCredentials credentials = credentialsByName.getOrDefault(name, fallback);
              if (credentials == null) {
                  return stub;
              } else {
                  return stub.withCallCredentials(credentials);
              }
          };
      }
docs: Creates a new {@link StubTransformer} that will assign credentials to the given {@link AbstractStub} based on the
  name. If the given map does not contain a value for the given name, then the optional fallback will be used
  otherwise the call credentials will be omitted.
  
  @param credentialsByName The map that contains the call credentials.
  @param fallback The optional fallback to use.
  @return The transformed stub.
  @see AbstractStub#withCallCredentials(CallCredentials)