@Test
  public void testParticipateMethodWithHelixPropertyStoreTaskDisabled() throws Exception {
    props.setProperty(ClusterMapConfig.ENABLE_PROPERTY_STORE_CLEAN_UP_TASK, Boolean.toString(false));
    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);
    helixParticipant.participateAndBlockStateTransition(Collections.emptyList(), null, null);
    assertNull("PropertyStoreCleanUpTask should not be registered",
        helixParticipant.getHelixManager().getStateMachineEngine()
            .getStateModelFactory(TaskConstants.STATE_MODEL_NAME));
    helixParticipant.close();
  }
Test participate method with property store helix task disabled
@throws Exception
ambry-clustermap/src/test/java/com/github/ambry/clustermap/HelixParticipantTest.java