private Message createMessage(HelixManager manager, String resourceName, String partitionName,
String instanceName, String currentState, String nextState, String sessionId,
String stateModelDefName, String stateModelFactoryName, int bucketSize)
{
String uuid = UUID.randomUUID().toString();
Message message = new Message(MessageType.STATE_TRANSITION, uuid);
message.setSrcName(manager.getInstanceName());
message.setTgtName(instanceName);
message.setMsgState(MessageState.NEW);
message.setPartitionName(partitionName);
message.setResourceName(resourceName);
message.setFromState(currentState);
message.setToState(nextState);
message.setTgtSessionId(sessionId);
message.setSrcSessionId(manager.getSessionId());
message.setStateModelDef(stateModelDefName);
message.setStateModelFactoryName(stateModelFactoryName);
message.setBucketSize(bucketSize);
return message;
}