@Test
  public void testAddAndStartBootstrapSession() {
    // Arrange
    reset();
    bootstrapSessionManager.addAndStartBootstrapSession(mockPartitionId, "snapshot1", "node1");

    // Act
    BootstrapSession session = bootstrapSessionManager.getBootstrapSession(mockPartitionId, "node1");

    // Assert
    assertNotNull(session);
    assertEquals("snapshot1", session.getSnapShotId());
    assertEquals("node1", session.getBootstrappingNodeId());
    assertEquals(mockPartitionId, session.getPartitionId());

    // Verify that compaction control was called one with the correct parameters
    verify(mockCompactionControl, times(1)).apply(mockPartitionId, false);
  }
Adds a bootstrap session. Test that the session is added correctly and that the compaction control is called.
ambry-store/src/test/java/com/github/ambry/store/BootstrapSessionManagerTest.java