@Test
public void testChangeMemberVotingStatesForSingleNodeShard() throws Exception {

    String name = "testChangeMemberVotingStatesForSingleNodeShard";
    String moduleShardsConfig = "module-shards-member1.conf";
    MemberNode leaderNode = MemberNode.builder(memberNodes).akkaConfig("Member1").testName(name)
            .moduleShardsConfig(moduleShardsConfig).datastoreContextBuilder(
                    DatastoreContext.newBuilder().shardHeartbeatIntervalInMillis(300).shardElectionTimeoutFactor(1))
            .build();
    leaderNode.configDataStore().waitTillReady();
    // Invoke RPC service on member-3 to change voting status
    ClusterAdminRpcService service = new ClusterAdminRpcService(leaderNode.configDataStore(),
            leaderNode.operDataStore(), null);
    RpcResult<ChangeMemberVotingStatesForShardOutput> rpcResult = service
            .changeMemberVotingStatesForShard(new ChangeMemberVotingStatesForShardInputBuilder()
                    .setShardName("cars").setDataStoreType(DataStoreType.Config)
                    .setMemberVotingState(ImmutableList
                            .of(new MemberVotingStateBuilder().setMemberName("member-1").setVoting(FALSE).build()))
                    .build())
            .get(10, TimeUnit.SECONDS);
    verifyFailedRpcResult(rpcResult);
    verifyVotingStates(leaderNode.configDataStore(), "cars", new SimpleEntry<>("member-1", TRUE));
}