# Package com.google.api.client.testing.util (2.1.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.1.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.testing.util)
- [2.0.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/2.0.3/com.google.api.client.testing.util)
- [1.47.1](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.47.1/com.google.api.client.testing.util)
- [1.46.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.46.3/com.google.api.client.testing.util)
- [1.45.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.45.3/com.google.api.client.testing.util)
- [1.44.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.44.2/com.google.api.client.testing.util)
- [1.43.2](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.43.2/com.google.api.client.testing.util)
- [1.42.3](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.42.3/com.google.api.client.testing.util)
- [1.41.8](https://docs.cloud.google.com/java/docs/reference/google-http-client/1.41.8/com.google.api.client.testing.util)
[com.google.api.client.util.Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta)   

Testing utilities used for writing tests based on this library.

## Classes

### [LogRecordingHandler](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.testing.util.LogRecordingHandler)

[Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta)   

Logging handler that stores log records.

### [MockBackOff](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.testing.util.MockBackOff)

[Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta)   

Mock for [BackOff](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.BackOff) that always returns a fixed number.

Implementation is not thread-safe.

### [MockSleeper](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.testing.util.MockSleeper)

[Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta)   

Mock for [Sleeper](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Sleeper).

Implementation is not thread-safe.

### [SecurityTestUtils](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.testing.util.SecurityTestUtils)

[Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta)   

Utilities and constants related to testing the library `util` package.

### [TestableByteArrayInputStream](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.testing.util.TestableByteArrayInputStream)

[Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta)   

Testable extension for a byte array input stream.

### [TestableByteArrayOutputStream](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.testing.util.TestableByteArrayOutputStream)

[Beta](https://docs.cloud.google.com/java/docs/reference/google-http-client/latest/com.google.api.client.util.Beta)   

Testable extension for a byte array output stream.