[components] BlackBoxTest => OpaqueTest

Change-Id: Ia963f88610bfc9f1a43eac8006c6ea102649c6dc
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/404896
Reviewed-by: Shai Barack <shayba@google.com>
Testability-Review: Shai Barack <shayba@google.com>
Commit-Queue: Fady Samuel <fsamuel@google.com>
diff --git a/src/lib/fuchsia-component/tests/components_v2/lib.rs b/src/lib/fuchsia-component/tests/components_v2/lib.rs
index b11d7b7..6dcb451 100644
--- a/src/lib/fuchsia-component/tests/components_v2/lib.rs
+++ b/src/lib/fuchsia-component/tests/components_v2/lib.rs
@@ -8,7 +8,7 @@
     log::*,
     test_utils_lib::{
         events::{EventMatcher, Ordering, Stopped},
-        test_utils::BlackBoxTest,
+        test_utils::OpaqueTest,
     },
 };
 
@@ -16,7 +16,7 @@
 async fn scoped_instances() -> Result<(), Error> {
     syslog::init_with_tags(&["fuchsia_component_v2_test"]).expect("could not initialize logging");
     let test =
-        BlackBoxTest::default("fuchsia-pkg://fuchsia.com/fuchsia-component-tests#meta/realm.cm")
+        OpaqueTest::default("fuchsia-pkg://fuchsia.com/fuchsia-component-tests#meta/realm.cm")
             .await?;
 
     let event_source = test.connect_to_event_source().await?;
diff --git a/src/storage/conformance/io1_tests.rs b/src/storage/conformance/io1_tests.rs
index 85262ce..45c21ed 100644
--- a/src/storage/conformance/io1_tests.rs
+++ b/src/storage/conformance/io1_tests.rs
@@ -12,17 +12,17 @@
         io1_harness_receiver::Io1HarnessReceiver,
         io1_request_logger_factory::Io1RequestLoggerFactory,
     },
-    test_utils_lib::test_utils::BlackBoxTest,
+    test_utils_lib::test_utils::OpaqueTest,
 };
 
-// Creates a BlackBoxTest component from the |url|, listens for the child component to connect
+// Creates a OpaqueTest component from the |url|, listens for the child component to connect
 // to a HarnessReceiver injector, and returns the connected HarnessProxy.
 async fn setup_harness_connection(
     url: String,
-) -> Result<(io_test::Io1HarnessProxy, BlackBoxTest), Error> {
-    let test = BlackBoxTest::default(&url)
+) -> Result<(io_test::Io1HarnessProxy, OpaqueTest), Error> {
+    let test = OpaqueTest::default(&url)
         .await
-        .context(format!("Cannot create BlackBoxTest with url {}", &url))?;
+        .context(format!("Cannot create OpaqueTest with url {}", &url))?;
     let event_source =
         test.connect_to_event_source().await.context("Cannot connect to event source.")?;
 
diff --git a/src/storage/conformance/src/lib.rs b/src/storage/conformance/src/lib.rs
index fea95e5..b05eeaf 100644
--- a/src/storage/conformance/src/lib.rs
+++ b/src/storage/conformance/src/lib.rs
@@ -10,7 +10,7 @@
 /// Allows logging of requests from a io.Directory channel.
 pub mod directory_request_logger;
 
-/// Injector for child components started by component manager BlackBoxTest
+/// Injector for child components started by component manager OpaqueTest
 /// to connect and provide Io1TestHarness to the test.
 pub mod io1_harness_receiver;
 
diff --git a/src/sys/component_manager/tests/base_resolver_test/base_resolver_test.rs b/src/sys/component_manager/tests/base_resolver_test/base_resolver_test.rs
index cbaed4f..4587bfc 100644
--- a/src/sys/component_manager/tests/base_resolver_test/base_resolver_test.rs
+++ b/src/sys/component_manager/tests/base_resolver_test/base_resolver_test.rs
@@ -18,10 +18,10 @@
     )?;
     let pkg_channel = pkg_proxy.into_channel().unwrap().into_zx_channel();
 
-    // A custom BlackBoxTest is required because
+    // A custom OpaqueTest is required because
     // 1. the /pkg dir of this component has to be passed in to component manager as /boot
     // 2. the component manager needs a manifest without fuchsia.sys.Loader
-    let test = BlackBoxTestBuilder::new("fuchsia-boot:///#meta/root.cm")
+    let test = OpaqueTestBuilder::new("fuchsia-boot:///#meta/root.cm")
         .component_manager_url("fuchsia-pkg://fuchsia.com/base_resolver_test#meta/component_manager_without_loader.cmx")
         .add_dir_handle("/boot", pkg_channel.into())
         .build().await?;
diff --git a/src/sys/component_manager/tests/component_manager_panic.rs b/src/sys/component_manager/tests/component_manager_panic.rs
index 13412b3..a4fa094 100644
--- a/src/sys/component_manager/tests/component_manager_panic.rs
+++ b/src/sys/component_manager/tests/component_manager_panic.rs
@@ -2,14 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-use {anyhow::Error, fuchsia_async as fasync, test_utils_lib::test_utils::BlackBoxTest};
+use {anyhow::Error, fuchsia_async as fasync, test_utils_lib::test_utils::OpaqueTest};
 
 #[fasync::run_singlethreaded(test)]
 async fn test() -> Result<(), Error> {
     // For the root component manifest, pass in the path the component manager
     // itself, which should be completely invalid.
     let mut test =
-        BlackBoxTest::default("fuchsia-pkg://fuchsia.com/component_manager#bin/component_manager")
+        OpaqueTest::default("fuchsia-pkg://fuchsia.com/component_manager#bin/component_manager")
             .await?;
 
     let event_source = test.connect_to_event_source().await?;
diff --git a/src/sys/component_manager/tests/destruction/integration_test.rs b/src/sys/component_manager/tests/destruction/integration_test.rs
index f2e01c0..ed0a1b6 100644
--- a/src/sys/component_manager/tests/destruction/integration_test.rs
+++ b/src/sys/component_manager/tests/destruction/integration_test.rs
@@ -21,7 +21,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn destruction() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/destruction_integration_test#meta/collection_realm.cm",
     )
     .await?;
diff --git a/src/sys/component_manager/tests/elf_runner/elf_runner_test.rs b/src/sys/component_manager/tests/elf_runner/elf_runner_test.rs
index 7f3066d..01a8214 100644
--- a/src/sys/component_manager/tests/elf_runner/elf_runner_test.rs
+++ b/src/sys/component_manager/tests/elf_runner/elf_runner_test.rs
@@ -27,7 +27,7 @@
 }
 
 async fn run_single_test(url: &str, expected_output: &str) -> Result<(), Error> {
-    let test = BlackBoxTest::default(url).await?;
+    let test = OpaqueTest::default(url).await?;
 
     let event_source = test.connect_to_event_source().await?;
     let (capability, mut echo_rx) = EchoCapability::new();
diff --git a/src/sys/component_manager/tests/events/integration_test.rs b/src/sys/component_manager/tests/events/integration_test.rs
index c15a025..8c193bc 100644
--- a/src/sys/component_manager/tests/events/integration_test.rs
+++ b/src/sys/component_manager/tests/events/integration_test.rs
@@ -13,7 +13,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn async_event_source_test() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/events_integration_test#meta/async_reporter.cm",
     )
     .await?;
@@ -42,7 +42,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn echo_interposer_test() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/events_integration_test#meta/interpose_echo_realm.cm",
     )
     .await?;
@@ -68,10 +68,9 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn scoped_events_test() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
-        "fuchsia-pkg://fuchsia.com/events_integration_test#meta/echo_realm.cm",
-    )
-    .await?;
+    let test =
+        OpaqueTest::default("fuchsia-pkg://fuchsia.com/events_integration_test#meta/echo_realm.cm")
+            .await?;
 
     let event_source = test.connect_to_event_source().await?;
 
@@ -119,7 +118,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn realm_offered_event_source_test() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/events_integration_test#meta/realm_offered_root.cm",
     )
     .await?;
@@ -152,7 +151,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn nested_event_source_test() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/events_integration_test#meta/nested_reporter.cm",
     )
     .await?;
@@ -180,7 +179,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn chained_interposer_test() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/events_integration_test#meta/chained_interpose_echo_realm.cm",
     )
     .await?;
@@ -217,7 +216,7 @@
 #[ignore]
 #[fasync::run_singlethreaded(test)]
 async fn event_dispatch_order_test() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/events_integration_test#meta/event_dispatch_order_root.cm",
     )
     .await?;
@@ -245,7 +244,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn event_capability_ready() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/events_integration_test#meta/capability_ready_root.cm",
     )
     .await?;
@@ -279,7 +278,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn resolved_error_test() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/events_integration_test#meta/resolved_error_reporter.cm",
     )
     .await?;
@@ -300,7 +299,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn synthesis_test() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/events_integration_test#meta/synthesis_reporter.cm",
     )
     .await?;
@@ -337,7 +336,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn static_event_stream_capability_requested_test() -> Result<(), Error> {
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/events_integration_test#meta/trigger_realm.cm",
     )
     .await?;
diff --git a/src/sys/component_manager/tests/hub/hub_integration_test.rs b/src/sys/component_manager/tests/hub/hub_integration_test.rs
index 584c6b0..457b9fc 100644
--- a/src/sys/component_manager/tests/hub/hub_integration_test.rs
+++ b/src/sys/component_manager/tests/hub/hub_integration_test.rs
@@ -15,7 +15,7 @@
 };
 
 pub struct TestRunner {
-    pub test: BlackBoxTest,
+    pub test: OpaqueTest,
     external_hub_v2_path: PathBuf,
     hub_report_capability: Arc<HubReportCapability>,
     channel_close_rx: mpsc::Receiver<()>,
@@ -33,7 +33,7 @@
             "There must always be at least one eager static component (the root)"
         );
 
-        let test = BlackBoxTest::default(root_component_url).await?;
+        let test = OpaqueTest::default(root_component_url).await?;
 
         let (hub_report_capability, channel_close_rx) = HubReportCapability::new();
 
diff --git a/src/sys/component_manager/tests/rights/rights_integration_test.rs b/src/sys/component_manager/tests/rights/rights_integration_test.rs
index 1f4c475..6b845a6 100644
--- a/src/sys/component_manager/tests/rights/rights_integration_test.rs
+++ b/src/sys/component_manager/tests/rights/rights_integration_test.rs
@@ -10,7 +10,7 @@
     fuchsia_zircon::{self as zx, HandleBased},
     scoped_task,
     std::ffi::CString,
-    test_utils_lib::test_utils::BlackBoxTestBuilder,
+    test_utils_lib::test_utils::OpaqueTestBuilder,
 };
 
 const COMPONENT_MANAGER_URL: &str =
@@ -25,7 +25,7 @@
     dir_handles: Vec<(String, zx::Handle)>,
     expected_result: &str,
 ) {
-    let test = BlackBoxTestBuilder::new(url)
+    let test = OpaqueTestBuilder::new(url)
         .component_manager_url(COMPONENT_MANAGER_URL)
         .extend_dir_handles(dir_handles)
         .build()
diff --git a/src/sys/component_manager/tests/security_policy/util/lib.rs b/src/sys/component_manager/tests/security_policy/util/lib.rs
index dc7c8e8..1630206 100644
--- a/src/sys/component_manager/tests/security_policy/util/lib.rs
+++ b/src/sys/component_manager/tests/security_policy/util/lib.rs
@@ -10,11 +10,11 @@
     fidl_fuchsia_sys2 as fsys, fuchsia_component,
     test_utils_lib::{
         events::*,
-        test_utils::{BlackBoxTest, BlackBoxTestBuilder},
+        test_utils::{OpaqueTest, OpaqueTestBuilder},
     },
 };
 
-fn connect_to_root_service<S: DiscoverableService>(test: &BlackBoxTest) -> Result<S::Proxy, Error> {
+fn connect_to_root_service<S: DiscoverableService>(test: &OpaqueTest) -> Result<S::Proxy, Error> {
     let mut service_path = test.get_hub_v2_path();
     service_path.extend(&["exec", "expose", "svc", S::SERVICE_NAME]);
     fuchsia_component::client::connect_to_service_at_path::<S>(service_path.to_str().unwrap())
@@ -24,8 +24,8 @@
     component_manager_url: &str,
     root_component_url: &str,
     config_path: &str,
-) -> Result<(BlackBoxTest, fsys::RealmProxy), Error> {
-    let test = BlackBoxTestBuilder::new(root_component_url)
+) -> Result<(OpaqueTest, fsys::RealmProxy), Error> {
+    let test = OpaqueTestBuilder::new(root_component_url)
         .component_manager_url(component_manager_url)
         .config_file(config_path)
         .build()
diff --git a/src/sys/component_manager/tests/shutdown_integration.rs b/src/sys/component_manager/tests/shutdown_integration.rs
index bd5e668..2f17552 100644
--- a/src/sys/component_manager/tests/shutdown_integration.rs
+++ b/src/sys/component_manager/tests/shutdown_integration.rs
@@ -6,7 +6,7 @@
 
 #[fasync::run_singlethreaded(test)]
 async fn test() -> Result<(), Error> {
-    let mut test = BlackBoxTest::default(
+    let mut test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/shutdown_integration_test#meta/shutdown_integration_root.cm",
     )
     .await?;
diff --git a/src/sys/component_manager/tests/storage/integration_test.rs b/src/sys/component_manager/tests/storage/integration_test.rs
index 7e274e4..27e4c10 100644
--- a/src/sys/component_manager/tests/storage/integration_test.rs
+++ b/src/sys/component_manager/tests/storage/integration_test.rs
@@ -32,7 +32,7 @@
 async fn storage() -> Result<(), Error> {
     LOGGER.init();
 
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/storage_integration_test#meta/storage_realm.cm",
     )
     .await?;
@@ -67,7 +67,7 @@
 async fn storage_from_collection() -> Result<(), Error> {
     LOGGER.init();
 
-    let test = BlackBoxTest::default(
+    let test = OpaqueTest::default(
         "fuchsia-pkg://fuchsia.com/storage_integration_test#meta/storage_realm_coll.cm",
     )
     .await?;
diff --git a/src/sys/component_manager/tests/test_utils.rs b/src/sys/component_manager/tests/test_utils.rs
index 4a087a1..37a987a 100644
--- a/src/sys/component_manager/tests/test_utils.rs
+++ b/src/sys/component_manager/tests/test_utils.rs
@@ -20,9 +20,9 @@
     std::path::PathBuf,
 };
 
-/// This static string is used by BlackBoxTest to start Component Manager v2.
+/// This static string is used by OpaqueTest to start Component Manager v2.
 /// A fuchsia system is expected to have Component Manager v2 at this URL for
-/// BlackBoxTest::default to work correctly.
+/// OpaqueTest::default to work correctly.
 pub static COMPONENT_MANAGER_URL: &str =
     "fuchsia-pkg://fuchsia.com/component-manager#meta/component_manager.cmx";
 
@@ -30,7 +30,7 @@
 /// of Component Manager v2. If this object is dropped, the component manager
 /// will be killed, ending the test.
 ///
-/// Any component using BlackBoxTest must satisfy the following minimal requirements
+/// Any component using OpaqueTest must satisfy the following minimal requirements
 /// in its manifest:
 ///
 /// "sandbox": {
@@ -46,7 +46,7 @@
 /// }
 ///
 /// Component manager requires the process.Launcher and LogSink services, so
-/// BlackBoxTest passes them into component manager from the parent component.
+/// OpaqueTest passes them into component manager from the parent component.
 ///
 /// The Environment service is required to ensure hermeticity. This is important
 /// for integration tests, where a single component runs multiple tests simultaneously.
@@ -57,7 +57,7 @@
 ///
 /// Usage: /src/sys/component_manager/tests contains multiple tests such as
 /// routing, base_resolver and shutdown which use this class.
-pub struct BlackBoxTest {
+pub struct OpaqueTest {
     /// The environment under which component manager runs
     pub env: EnvironmentControllerProxy,
 
@@ -74,7 +74,7 @@
     pub label: String,
 }
 
-impl BlackBoxTest {
+impl OpaqueTest {
     /// Creates a black box test with the default component manager URL and no
     /// additional directory handles that are passed in to component manager.
     /// The output of component manager is not redirected.
@@ -82,9 +82,9 @@
     /// At the end of this function call, a component manager has been created
     /// in a hermetic environment and its execution is halted.
     ///
-    /// For greater control over test setup parameters, use [`BlackBoxTestBuilder`].
+    /// For greater control over test setup parameters, use [`OpaqueTestBuilder`].
     pub async fn default(root_component_url: &str) -> Result<Self, Error> {
-        BlackBoxTestBuilder::new(root_component_url).build().await
+        OpaqueTestBuilder::new(root_component_url).build().await
     }
 
     /// The path from Hub v1 to component manager.
@@ -108,8 +108,8 @@
     }
 }
 
-/// Configures a [`BlackBoxTest`].
-pub struct BlackBoxTestBuilder {
+/// Configures a [`OpaqueTest`].
+pub struct OpaqueTestBuilder {
     root_component_url: String,
     component_manager_url: Option<String>,
     dir_handles: Vec<(String, zx::Handle)>,
@@ -117,11 +117,11 @@
     extra_args: Vec<String>,
 }
 
-impl BlackBoxTestBuilder {
-    /// Creates a new BlackBoxTestBuilder instance configured to launch the root component
+impl OpaqueTestBuilder {
+    /// Creates a new OpaqueTestBuilder instance configured to launch the root component
     /// identified by the URL `root_component_url`.
     pub fn new(root_component_url: impl Into<String>) -> Self {
-        BlackBoxTestBuilder {
+        OpaqueTestBuilder {
             root_component_url: root_component_url.into(),
             component_manager_url: None,
             dir_handles: Vec::new(),
@@ -167,9 +167,9 @@
         self
     }
 
-    /// Builds a BlackBoxTest. Upon success, a component manager has been created
+    /// Builds a OpaqueTest. Upon success, a component manager has been created
     /// in a hermetic environment and its execution is halted.
-    pub async fn build(self) -> Result<BlackBoxTest, Error> {
+    pub async fn build(self) -> Result<OpaqueTest, Error> {
         // Use a random integer to identify this component manager
         let random_num = random::<u32>();
         let label = format!("test_{}", random_num);
@@ -187,7 +187,7 @@
         )
         .await?;
 
-        Ok(BlackBoxTest {
+        Ok(OpaqueTest {
             env,
             component_manager_app,
             component_manager_url,
diff --git a/src/sys/component_manager/tests/utc-time/integration_test.rs b/src/sys/component_manager/tests/utc-time/integration_test.rs
index 1f1547c..af49d31 100644
--- a/src/sys/component_manager/tests/utc-time/integration_test.rs
+++ b/src/sys/component_manager/tests/utc-time/integration_test.rs
@@ -12,7 +12,7 @@
 use futures::{channel::oneshot, lock::Mutex, prelude::*};
 use log::*;
 use std::sync::Arc;
-use test_utils_lib::{events::*, test_utils::BlackBoxTestBuilder};
+use test_utils_lib::{events::*, test_utils::OpaqueTestBuilder};
 use vfs::{
     directory::entry::DirectoryEntry, execution_scope::ExecutionScope, file::pcb::read_only_static,
     pseudo_directory,
@@ -49,14 +49,14 @@
 
     // Start a component_manager as a v1 component, with the extra `--maintain-utc-clock` flag.
     debug!("starting component_manager");
-    let test = BlackBoxTestBuilder::new(
+    let test = OpaqueTestBuilder::new(
         "fuchsia-pkg://fuchsia.com/utc-time-tests#meta/consumer-component.cm",
     )
     .add_extra_arg("--maintain-utc-clock")
     .add_dir_handle("/boot", client.into())
     .build()
     .await
-    .expect("failed to start the BlackBoxTest");
+    .expect("failed to start the OpaqueTest");
     let event_source = test
         .connect_to_event_source()
         .await
diff --git a/src/sys/component_manager/tests/work_scheduler/work_scheduler_integration_test.rs b/src/sys/component_manager/tests/work_scheduler/work_scheduler_integration_test.rs
index 3e8b089..78683c9 100644
--- a/src/sys/component_manager/tests/work_scheduler/work_scheduler_integration_test.rs
+++ b/src/sys/component_manager/tests/work_scheduler/work_scheduler_integration_test.rs
@@ -12,7 +12,7 @@
 async fn basic_work_scheduler_test() -> Result<(), Error> {
     let root_component_url =
         "fuchsia-pkg://fuchsia.com/work_scheduler_integration_test#meta/bound_worker.cm";
-    let test = BlackBoxTest::default(root_component_url).await?;
+    let test = OpaqueTest::default(root_component_url).await?;
 
     let event_source = test.connect_to_event_source().await?;
     let mut event_stream = event_source.subscribe(vec![Started::NAME]).await?;
@@ -39,7 +39,7 @@
 async fn unbound_work_scheduler_test() -> Result<(), Error> {
     let root_component_url =
         "fuchsia-pkg://fuchsia.com/work_scheduler_integration_test#meta/unbound_child_worker_parent.cm";
-    let test = BlackBoxTest::default(root_component_url).await?;
+    let test = OpaqueTest::default(root_component_url).await?;
 
     let event_source = test.connect_to_event_source().await?;
     let mut event_stream = event_source.subscribe(vec![Started::NAME]).await?;
diff --git a/src/sys/tools/cs2/tests/cs2_test.rs b/src/sys/tools/cs2/tests/cs2_test.rs
index c651e21..9be4bd7 100644
--- a/src/sys/tools/cs2/tests/cs2_test.rs
+++ b/src/sys/tools/cs2/tests/cs2_test.rs
@@ -27,7 +27,7 @@
 
 #[fuchsia_async::run_singlethreaded(test)]
 async fn empty_component() -> Result<(), Error> {
-    let test = BlackBoxTest::default("fuchsia-pkg://fuchsia.com/cs2_test#meta/empty.cm").await?;
+    let test = OpaqueTest::default("fuchsia-pkg://fuchsia.com/cs2_test#meta/empty.cm").await?;
     let event_source = test.connect_to_event_source().await?;
     let mut event_stream = event_source.subscribe(vec![Started::NAME]).await?;
 
@@ -57,7 +57,7 @@
 
 #[fuchsia_async::run_singlethreaded(test)]
 async fn tree() -> Result<(), Error> {
-    let test = BlackBoxTest::default("fuchsia-pkg://fuchsia.com/cs2_test#meta/root.cm").await?;
+    let test = OpaqueTest::default("fuchsia-pkg://fuchsia.com/cs2_test#meta/root.cm").await?;
     let event_source = test.connect_to_event_source().await?;
     let mut event_stream = event_source.subscribe(vec![Started::NAME]).await?;
 
@@ -141,8 +141,7 @@
 
 #[fuchsia_async::run_singlethreaded(test)]
 async fn echo_realm() -> Result<(), Error> {
-    let test =
-        BlackBoxTest::default("fuchsia-pkg://fuchsia.com/cs2_test#meta/echo_realm.cm").await?;
+    let test = OpaqueTest::default("fuchsia-pkg://fuchsia.com/cs2_test#meta/echo_realm.cm").await?;
     let event_source = test.connect_to_event_source().await?;
 
     let mut event_stream = event_source.subscribe(vec![Started::NAME]).await?;