# SceneCoreTestRule

Artifact: [androidx.xr.scenecore:scenecore-testing](https://developer.android.com/jetpack/androidx/releases/xr-scenecore) [View Source](https://cs.android.com/search?q=file:androidx/xr/scenecore/testing/SceneCoreTestRule.kt+class:androidx.xr.scenecore.testing.SceneCoreTestRule) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

*** ** * ** ***


```
public final class SceneCoreTestRule extends ExternalResource
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [org.junit.rules.ExternalResource](https://junit.org/junit4/javadoc/latest/org/junit/rules/ExternalResource.html) ||
|   | ↳ | [androidx.xr.scenecore.testing.SceneCoreTestRule](https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule) |

*** ** * ** ***

A JUnit Rule for establishing a test environment for SceneCore applications.

This rule provides fake implementations and test accessors for SceneCore components, allowing you to configure and verify the internal runtime states of SceneCore's public API objects like `https://developer.android.com/reference/androidx/xr/scenecore/Entity` and `https://developer.android.com/reference/androidx/xr/scenecore/Component`.

To enable the test rule to manage the lifecycle and state of SceneCore objects, you must register the created instance with the rule after its creation using the `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.Entity)` method provided by this rule. These methods return test-specific accessors that allow inspection and manipulation of the underlying fake instance.

Example usage:

```
@Rule @JvmField val testRule = SceneCoreTestRule()

// Inside a test method:
// Create a SceneCore Entity
val entity = PanelEntity.create(...)
// Register it with the rule and get the test accessor
val entityTester = testRule.createTester<PanelEntityTester>(entity)
// Use entityTester to interact with the entity's state

// Create a SceneCore Component
val component = MovableComponent.create(...)
// Register it and get the test accessor
val componentTester = testRule.createTester<MovableComponentTester>(component)
// Use componentTester to interact with the component's state
```

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#SceneCoreTestRule()()` |

| ### Public methods |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/ImageBasedLightingAssetTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.ImageBasedLightingAsset)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/ImageBasedLightingAsset asset)` Creates a test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/ImageBasedLightingAsset`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull T` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.Component)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/Component component)` Creates a specific test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/Component`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull T` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.Entity)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/Entity entity)` Creates a specific test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/Entity`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.GltfModel)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/GltfModel gltfModel)` Retrieves a test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/GltfModel`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(android.media.MediaPlayer)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/media/MediaPlayer.html mediaPlayer)` Creates the test data accessor for the given `https://developer.android.com/reference/android/media/MediaPlayer.html`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/SoundEffectPoolTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.SoundEffectPool)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/SoundEffectPool soundEffectPool)` Retrieves a test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/SoundEffectPool`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/TextureTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.Texture)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/Texture texture)` Creates a test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/Texture`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/ActivitySpaceTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#getActivitySpaceTester()()` Provides the instance of `https://developer.android.com/reference/androidx/xr/scenecore/testing/ActivitySpaceTester` which is a test data accessor of the `https://developer.android.com/reference/androidx/xr/scenecore/ActivitySpace`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/MainPanelEntityTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#getMainPanelEntityTester()()` Provides the test-only accessor for `https://developer.android.com/reference/androidx/xr/scenecore/MainPanelEntity` that enables direct manipulation and inspection of its internal state. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/PerceptionSpaceTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#getPerceptionSpaceTester()()` Provides the instance of `https://developer.android.com/reference/androidx/xr/scenecore/testing/PerceptionSpaceTester` which is a test data accessor of the `https://developer.android.com/reference/androidx/xr/scenecore/PerceptionSpace`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#getSceneTester()()` Provides access to a controller for simulating runtime spatial states of the `https://developer.android.com/reference/androidx/xr/scenecore/Scene`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialAudioTrackBuilderTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#getSpatialAudioTrackBuilderTester()()` Provides the test data accessor for the `https://developer.android.com/reference/androidx/xr/scenecore/SpatialAudioTrackBuilder`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialAudioTrackTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#getSpatialAudioTrackTester()()` Provides the test data accessor for the `https://developer.android.com/reference/androidx/xr/scenecore/SpatialAudioTrack`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialEnvironmentTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#getSpatialEnvironmentTester()()` The test data accessor for the `https://developer.android.com/reference/androidx/xr/scenecore/SpatialEnvironment`. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialSoundPoolTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#getSpatialSoundPoolTester()()` This provides a `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialSoundPoolTester` instance for accessing the SpatialSoundPool's underlying fake test data. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialWindowTester` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#getSpatialWindowTester()()` Provides the `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialWindowTester` test data accessor for the `https://developer.android.com/reference/androidx/xr/scenecore/SpatialWindow`. |

| ### Protected methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#after()()` |
| `void` | `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#before()()` |

### Inherited methods

From [org.junit.rules.ExternalResource](https://junit.org/junit4/javadoc/latest/org/junit/rules/ExternalResource.html) `@https://developer.android.com/reference/androidx/annotation/NonNull https://junit.org/junit4/javadoc/latest/org/junit/runners/model/Statement.html` `https://junit.org/junit4/javadoc/latest/org/junit/rules/ExternalResource.html#apply-org.junit.runners.model.Statement-org.junit.runner.Description-(@https://developer.android.com/reference/androidx/annotation/NonNull https://junit.org/junit4/javadoc/latest/org/junit/runners/model/Statement.html base, @https://developer.android.com/reference/androidx/annotation/NonNull https://junit.org/junit4/javadoc/latest/org/junit/runner/Description.html description)`

## Public constructors

### SceneCoreTestRule

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public SceneCoreTestRule()
```

## Public methods

### createTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull ImageBasedLightingAssetTester createTester(@NonNull ImageBasedLightingAsset asset)
```

Creates a test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/ImageBasedLightingAsset`.

In the test environment, each asset created via `https://developer.android.com/reference/androidx/xr/scenecore/ImageBasedLightingAsset.Companion#createFromZip(androidx.xr.runtime.Session,androidx.xr.scenecore.runtime.RenderingRuntime,kotlin.String)` has corresponding underlying fake data. This function provides access to that fake data, allowing for verification or manipulation in tests.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/ImageBasedLightingAsset asset` | The `https://developer.android.com/reference/androidx/xr/scenecore/ImageBasedLightingAsset` instance for which to retrieve test data. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/ImageBasedLightingAssetTester` | A `https://developer.android.com/reference/androidx/xr/scenecore/testing/ImageBasedLightingAssetTester` instance used to inspect and manipulate the test data. |

### createTester

```
public final @NonNull T <T extends Object> createTester(@NonNull Component component)
```

Creates a specific test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/Component`.

In the test environment, components have corresponding underlying fake data. This function provides a convenient, type-safe way to access the specific tester associated with a component's subclass, allowing for verification or manipulation in tests.

Example usage:

```
val componentTester = rule.createTester<BoundsComponentTester>(myBoundsComponent)
```

| Parameters |
|---|---|
| `<T extends https://developer.android.com/reference/java/lang/Object.html>` | The expected type of the component tester (e.g., `BoundsComponentTester`). |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/Component component` | The `https://developer.android.com/reference/androidx/xr/scenecore/Component` instance for which to retrieve the test data accessor. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull T` | A tester instance of type `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.Component)`. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | If the underlying tester created for the component does not match the expected type `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.Component)`, or if no tester is found. |

### createTester

```
public final @NonNull T <T extends Object> createTester(@NonNull Entity entity)
```

Creates a specific test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/Entity`.

In the test environment, entities have corresponding underlying fake data. This function provides a convenient, type-safe way to access the specific tester associated with an entity's subclass, allowing for verification or manipulation in tests.

Example usage:

```
val entityTester = rule.createTester<PanelEntityTester>(myPanelEntity)
```

| Parameters |
|---|---|
| `<T extends https://developer.android.com/reference/java/lang/Object.html>` | The expected type of the entity tester (e.g., `PanelEntityTester`). |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/Entity entity` | The `https://developer.android.com/reference/androidx/xr/scenecore/Entity` instance for which to retrieve the test data accessor. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull T` | A tester instance of type `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.Entity)`. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | If the underlying tester created for the entity does not match the expected type `https://developer.android.com/reference/androidx/xr/scenecore/testing/SceneCoreTestRule#createTester(androidx.xr.scenecore.Entity)`. |

### createTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull GltfModelTester createTester(@NonNull GltfModel gltfModel)
```

Retrieves a test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/GltfModel`.

In the test environment, each model created via `https://developer.android.com/reference/androidx/xr/scenecore/GltfModel.Companion#create(androidx.xr.scenecore.runtime.RenderingRuntime,kotlin.String)` has corresponding underlying fake data. This function provides access to that fake data, allowing for verification or manipulation in tests.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/GltfModel gltfModel` | The `https://developer.android.com/reference/androidx/xr/scenecore/GltfModel` instance for which to retrieve test data. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelTester` | A `https://developer.android.com/reference/androidx/xr/scenecore/testing/GltfModelTester` instance used to inspect and manipulate the test data. |

### createTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull SpatialMediaPlayerTester createTester(@NonNull MediaPlayer mediaPlayer)
```

Creates the test data accessor for the given `https://developer.android.com/reference/android/media/MediaPlayer.html`.

This class provides a mechanism for tests to inspect and verify spatial audio attributes associated with a `https://developer.android.com/reference/android/media/MediaPlayer.html` that are otherwise encapsulated within the SceneCore runtime.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/media/MediaPlayer.html mediaPlayer` | The `https://developer.android.com/reference/android/media/MediaPlayer.html` audio attributes are associated with. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester` | A `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialMediaPlayerTester` instance used to inspect and manipulate the test data. |

### createTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull SoundEffectPoolTester createTester(@NonNull SoundEffectPool soundEffectPool)
```

Retrieves a test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/SoundEffectPool`.

In the test environment, each `https://developer.android.com/reference/androidx/xr/scenecore/SoundEffectPool` created via `https://developer.android.com/reference/androidx/xr/scenecore/SoundEffectPool.Companion#create(androidx.xr.scenecore.runtime.SceneRuntime,kotlin.Int)` has corresponding underlying fake data. This function provides access to that fake data, allowing for verification or manipulation in tests.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/SoundEffectPool soundEffectPool` | The `https://developer.android.com/reference/androidx/xr/scenecore/SoundEffectPool` instance for which to retrieve test data. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/SoundEffectPoolTester` | A `https://developer.android.com/reference/androidx/xr/scenecore/testing/SoundEffectPoolTester` instance used to inspect and manipulate the test data. |

### createTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull TextureTester createTester(@NonNull Texture texture)
```

Creates a test data accessor for the given `https://developer.android.com/reference/androidx/xr/scenecore/Texture`.

In the test environment, each texture created via `https://developer.android.com/reference/androidx/xr/scenecore/Texture#create(androidx.xr.runtime.Session,java.nio.file.Path)` has corresponding underlying fake data. This function provides access to that fake data, allowing for verification or manipulation in tests.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/Texture texture` | The `https://developer.android.com/reference/androidx/xr/scenecore/Texture` instance for which to retrieve test data. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/xr/scenecore/testing/TextureTester` | A `https://developer.android.com/reference/androidx/xr/scenecore/testing/TextureTester` instance used to inspect and manipulate the test data. |

### getActivitySpaceTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull ActivitySpaceTester getActivitySpaceTester()
```

Provides the instance of `https://developer.android.com/reference/androidx/xr/scenecore/testing/ActivitySpaceTester` which is a test data accessor of the `https://developer.android.com/reference/androidx/xr/scenecore/ActivitySpace`.

The `https://developer.android.com/reference/androidx/xr/scenecore/ActivitySpace` is an `https://developer.android.com/reference/androidx/xr/scenecore/Entity` used to track the system-managed pose and boundary of the volume associated with a spatialized Activity. The Application cannot directly control this volume, but the system might update it in response to the User moving it or entering or exiting Full Space Mode.

### getMainPanelEntityTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull MainPanelEntityTester getMainPanelEntityTester()
```

Provides the test-only accessor for `https://developer.android.com/reference/androidx/xr/scenecore/MainPanelEntity` that enables direct manipulation and inspection of its internal state.

### getPerceptionSpaceTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull PerceptionSpaceTester getPerceptionSpaceTester()
```

Provides the instance of `https://developer.android.com/reference/androidx/xr/scenecore/testing/PerceptionSpaceTester` which is a test data accessor of the `https://developer.android.com/reference/androidx/xr/scenecore/PerceptionSpace`.

The `https://developer.android.com/reference/androidx/xr/scenecore/PerceptionSpace` represents the origin of the space in which ARCore for Jetpack XR provides tracking info. The transformations provided by the PerceptionSpace are only valid for the call frame, as the transformation can be changed by the system at any time.

### getSceneTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull SceneTester getSceneTester()
```

Provides access to a controller for simulating runtime spatial states of the `https://developer.android.com/reference/androidx/xr/scenecore/Scene`.

Use this to test how your application responds to changes in various spatial-related runtime states, such as visibility, capability and so on.

### getSpatialAudioTrackBuilderTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull SpatialAudioTrackBuilderTester getSpatialAudioTrackBuilderTester()
```

Provides the test data accessor for the `https://developer.android.com/reference/androidx/xr/scenecore/SpatialAudioTrackBuilder`.

This class provides a mechanism for tests to inspect and verify spatial audio attributes associated with an `https://developer.android.com/reference/android/media/AudioTrack.Builder.html` that are otherwise encapsulated within the SceneCore runtime.

### getSpatialAudioTrackTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull SpatialAudioTrackTester getSpatialAudioTrackTester()
```

Provides the test data accessor for the `https://developer.android.com/reference/androidx/xr/scenecore/SpatialAudioTrack`.

This class provides a mechanism for tests to inspect and verify spatial audio attributes associated with an `https://developer.android.com/reference/android/media/AudioTrack.html` that are otherwise encapsulated within the SceneCore runtime.

### getSpatialEnvironmentTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull SpatialEnvironmentTester getSpatialEnvironmentTester()
```

The test data accessor for the `https://developer.android.com/reference/androidx/xr/scenecore/SpatialEnvironment`.

### getSpatialSoundPoolTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull SpatialSoundPoolTester getSpatialSoundPoolTester()
```

This provides a `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialSoundPoolTester` instance for accessing the SpatialSoundPool's underlying fake test data.

### getSpatialWindowTester

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/xr-scenecore#1.0.0)

```
public final @NonNull SpatialWindowTester getSpatialWindowTester()
```

Provides the `https://developer.android.com/reference/androidx/xr/scenecore/testing/SpatialWindowTester` test data accessor for the `https://developer.android.com/reference/androidx/xr/scenecore/SpatialWindow`.

## Protected methods

### after

```
protected void after()
```

### before

```
protected void before()
```