@Test
    void basicCase() throws Exception {
        final String listenerName = "listener_0";
        final String routeName = "local_route";
        final String clusterName = "some_service";
        final Bootstrap bootstrap = XdsTestResources.bootstrap(server.httpUri());
        try (XdsBootstrapImpl xdsBootstrap = new XdsBootstrapImpl(bootstrap)) {
            final ListenerRoot listenerRoot = xdsBootstrap.listenerRoot(listenerName);

            final TestResourceWatcher watcher = new TestResourceWatcher();
            listenerRoot.addSnapshotWatcher(watcher);
            final Listener expectedListener =
                    cache.getSnapshot(GROUP).listeners().resources().get(listenerName);
            final ListenerSnapshot listenerSnapshot =
                    watcher.blockingChanged(ListenerSnapshot.class);
            assertThat(listenerSnapshot.xdsResource().resource()).isEqualTo(expectedListener);

            final RouteConfiguration expectedRoute =
                    cache.getSnapshot(GROUP).routes().resources().get(routeName);
            final RouteSnapshot routeSnapshot = listenerSnapshot.routeSnapshot();
            assertThat(routeSnapshot.xdsResource().resource()).isEqualTo(expectedRoute);

            final Cluster expectedCluster =
                    cache.getSnapshot(GROUP).clusters().resources().get(clusterName);
            final ClusterSnapshot clusterSnapshot = routeSnapshot.virtualHostSnapshots().get(0)
                                                                 .routeEntries().get(0)
                                                                 .clusterSnapshot();
            assertThat(clusterSnapshot.xdsResource().resource()).isEqualTo(expectedCluster);

            final ClusterLoadAssignment expectedEndpoint =
                    cache.getSnapshot(GROUP).endpoints().resources().get(clusterName);
            final EndpointSnapshot endpointSnapshot = clusterSnapshot.endpointSnapshot();
            assertThat(endpointSnapshot.xdsResource().resource()).isEqualTo(expectedEndpoint);

            await().pollDelay(100, TimeUnit.MILLISECONDS)
                   .untilAsserted(() -> assertThat(watcher.events()).isEmpty());
        }
    }
This class ensures that the dynamic bootstrap configuration example at
<a href="https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/examples#dynamic">
Dynamic Example</a> is parsed and fetched correctly.
xds/src/test/java/com/linecorp/armeria/xds/DynamicResourcesTest.java