public boolean assignUnicastAddress(final int unicastAddress) throws IllegalArgumentException {
        if (getNode(unicastAddress) != null)
            throw new IllegalArgumentException("Unicast address is already in use.");

        this.unicastAddress = unicastAddress;
        notifyNetworkUpdated();
        return true;
    }
Assigns a unicast address, to be used by a node

@param unicastAddress Unicast address
@return true if success, false if the address is in use by another device
mesh/src/main/java/no/nordicsemi/android/mesh/BaseMeshNetwork.java