@Test
  public void testEnableStatePostparticipate() throws IOException {
    assumeTrue(stateModelDef.equals(ClusterMapConfig.AMBRY_STATE_MODEL_DEF));
    ClusterMapConfig clusterMapConfig = new ClusterMapConfig(new VerifiableProperties(props));
    MetricRegistry metricRegistry = new MetricRegistry();
    HelixParticipant helixParticipant =
        new HelixParticipant(mock(HelixClusterManager.class), clusterMapConfig, new HelixFactory(), metricRegistry,
            getDefaultZkConnectStr(clusterMapConfig), true);
    HelixManager manager = helixParticipant.getHelixManager();

    assertEquals(manager.getInstanceType(), InstanceType.PARTICIPANT);
    assertNotNull("HelixManager cannot be null", manager);

    helixParticipant.participateAndBlockStateTransition(Collections.emptyList(), null, null);

    // Without cloud config, instances should still be in ENABLE state
    assertEquals(InstanceConstants.InstanceOperation.ENABLE,
        manager.getConfigAccessor().getInstanceConfig(clusterName, manager.getInstanceName()).getInstanceOperation().getOperation());

    helixParticipant.close();
  }
Test participate method, which triggers state transition.
@throws Exception
ambry-clustermap/src/test/java/com/github/ambry/clustermap/HelixParticipantTest.java