private LogEvent logContains(String substring) {
    ArgumentMatcher<LogEvent> matcher = event -> event.getMessage().contains(substring);
    return ArgumentMatchers.argThat(matcher);
  }
Sets up an auth server and a registry. The auth server can return a bearer token up to {@code
maxAuthTokens} times. The registry will initially return "401 Unauthorized" for {@code
maxTokenResponses} times. (Therefore, a registry client has to get auth tokens from the auth
server {@code maxAuthTokens} times. After that, the registry returns {@code finalResponse}.
jib-core/src/test/java/com/google/cloud/tools/jib/registry/RegistryClientTest.java