private UnprovisionedMeshNode initializeMeshNode(@NonNull final UUID uuid,
                                                     @NonNull final NetworkKey networkKey,
                                                     final int flags,
                                                     final int ivIndex,
                                                     final int globalTtl) throws IllegalArgumentException {
        UnprovisionedMeshNode unprovisionedMeshNode = null;

        if (validateProvisioningDataInput(networkKey, flags, ivIndex)) {
            final byte[] flagBytes = ByteBuffer.allocate(1).put((byte) flags).array();

            byte[] ivIndexBytes = null;
            if (MeshParserUtils.validateIvIndexInput(mContext, ivIndex)) {
                ivIndexBytes = ByteBuffer.allocate(4).putInt(ivIndex).array();
            }

            unprovisionedMeshNode = new UnprovisionedMeshNode(uuid);
            unprovisionedMeshNode.setNetworkKey(networkKey.getTxNetworkKey());
            unprovisionedMeshNode.setKeyIndex(networkKey.getKeyIndex());
            unprovisionedMeshNode.setFlags(flagBytes);
            unprovisionedMeshNode.setIvIndex(ivIndexBytes);
            unprovisionedMeshNode.setTtl(globalTtl);
            mUnprovisionedMeshNode = unprovisionedMeshNode;
        }
        return unprovisionedMeshNode;
    }
Initializes a mesh node object to be provisioned

@param uuid       Device UUID of unprovisioned node
@param networkKey Network key
@param flags      Flag containing the key refresh or the iv update operations
@param ivIndex    32-bit value shared across the network
@param globalTtl  Global ttl which is also the number of hops to be used for a message
@return {@link MeshModel} to be provisioned
mesh/src/main/java/no/nordicsemi/android/mesh/MeshProvisioningHandler.java