# PrepareGetCredentialResponse.TestBuilder

Artifact: [androidx.credentials:credentials](https://developer.android.com/jetpack/androidx/releases/credentials) [View Source](https://cs.android.com/search?q=file:androidx/credentials/PrepareGetCredentialResponse.kt+class:androidx.credentials.PrepareGetCredentialResponse.TestBuilder) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

*** ** * ** ***

<br />

```
@VisibleForTesting
public final class PrepareGetCredentialResponse.TestBuilder
```

<br />

*** ** * ** ***

A builder for `https://developer.android.com/reference/android/credentials/PrepareGetCredentialResponse.html` for test use only.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/credentials/PrepareGetCredentialResponse.TestBuilder#TestBuilder()()` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/PrepareGetCredentialResponse` | `https://developer.android.com/reference/androidx/credentials/PrepareGetCredentialResponse.TestBuilder#build()()` Builds a `https://developer.android.com/reference/android/credentials/PrepareGetCredentialResponse.html`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/PrepareGetCredentialResponse.TestBuilder` | `@https://developer.android.com/reference/androidx/annotation/VisibleForTesting https://developer.android.com/reference/androidx/credentials/PrepareGetCredentialResponse.TestBuilder#setCredentialTypeDelegate(kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> handler )` Sets the credential type handler. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/PrepareGetCredentialResponse.TestBuilder` | `@https://developer.android.com/reference/androidx/annotation/VisibleForTesting https://developer.android.com/reference/androidx/credentials/PrepareGetCredentialResponse.TestBuilder#setHasAuthResultsDelegate(kotlin.Function0)(@https://developer.android.com/reference/androidx/annotation/NonNull Function0<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> handler)` Sets the has authentication results bit. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/credentials/PrepareGetCredentialResponse.TestBuilder` | `@https://developer.android.com/reference/androidx/annotation/VisibleForTesting https://developer.android.com/reference/androidx/credentials/PrepareGetCredentialResponse.TestBuilder#setHasRemoteResultsDelegate(kotlin.Function0)(@https://developer.android.com/reference/androidx/annotation/NonNull Function0<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> handler)` Sets the has remote results bit. |

## Public constructors

### TestBuilder

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
public TestBuilder()
```

## Public methods

### build

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
public final @NonNull PrepareGetCredentialResponse build()
```

Builds a `https://developer.android.com/reference/android/credentials/PrepareGetCredentialResponse.html`.

### setCredentialTypeDelegate

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
@VisibleForTesting
public final @NonNull PrepareGetCredentialResponse.TestBuilder setCredentialTypeDelegate(
    @NonNull Function1<@NonNull String, @NonNull Boolean> handler
)
```

Sets the credential type handler.

### setHasAuthResultsDelegate

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
@VisibleForTesting
public final @NonNull PrepareGetCredentialResponse.TestBuilder setHasAuthResultsDelegate(@NonNull Function0<@NonNull Boolean> handler)
```

Sets the has authentication results bit.

### setHasRemoteResultsDelegate

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/credentials#1.2.0)

```
@VisibleForTesting
public final @NonNull PrepareGetCredentialResponse.TestBuilder setHasRemoteResultsDelegate(@NonNull Function0<@NonNull Boolean> handler)
```

Sets the has remote results bit.