message: Added test to validate correctness of DDS created in detached mode.
diff: */
  import { strict as assert } from "assert";
  -import { IRequest } from "@fluidframework/core-interfaces";
  +import { IFluidHandle, IRequest } from "@fluidframework/core-interfaces";
  import { AttachState, IContainer } from "@fluidframework/container-definitions";
  import { ConnectionState, Container, Loader } from "@fluidframework/container-loader";
  import { IFluidDataStoreContext } from "@fluidframework/runtime-definitions";
  @@ -180,6 +180,35 @@ describeFullCompat("Detached Container", (getTestObjectProvider) => {
  assert.strictEqual(testDataStore.context.attachState, AttachState.Attached, "DataStore should be attached!!");
  });
  + it("can create DDS in detached container and attach / update it", async () => {
  + const container = await loader.createDetachedContainer(provider.defaultCodeDetails);
  + const dsClient1 = await requestFluidObject<ITestFluidObject>(container, "/");
  +
  + // Create a DDS after the root data store is created and loaded.
  + const mapClient1 = SharedMap.create(dsClient1.runtime);
  + dsClient1.root.set("map", mapClient1.handle);
  +
  + // Attach the container and validate that the DDS is attached.
  + await container.attach(provider.driver.createCreateNewRequest(provider.documentId));
  + assert(mapClient1.isAttached(), "The map should be attached after the container attaches.");
  +
  + // Load a second container and validate it can load the DDS.
  + const container2 = await provider.loadTestContainer();
  + const dsClient2 = await requestFluidObject<ITestFluidObject>(container2, "/");
  + const mapClient2 = await dsClient2.root.get<IFluidHandle<SharedMap>>("map")?.get();
  + assert(mapClient2 !== undefined, "Map is not available in the second client");
  +
  + // Make a change in the first client's DDS and validate that the change is reflected in the second client.
  + mapClient1.set("key1", "value1");
  + await provider.ensureSynchronized();
  + assert.strictEqual(mapClient2.get("key1"), "value1", "Map change not reflected in second client.");
  +
  + // Make a change in the second client's DDS and validate that the change is reflected in the first client.
  + mapClient2.set("key2", "value2");
  + await provider.ensureSynchronized();
  + assert.strictEqual(mapClient1.get("key2"), "value2", "Map change not reflected in first client.");
  + });
  +
  it("Load attached container and check for dataStores", async () => {
  const container = await loader.createDetachedContainer(provider.defaultCodeDetails);
  // Get the root dataStore from the detached container.
  