public boolean addNetKey(@NonNull final NetworkKey newNetKey) {
        if (isNetKeyExists(newNetKey.getKey())) {
            throw new IllegalArgumentException("Net key already exists, check the contents of the key!");
        } else {
            newNetKey.setMeshUuid(meshUUID);
            netKeys.add(newNetKey);
            notifyNetKeyAdded(newNetKey);
        }
        return true;
    }
Adds a Net key to the list of net keys with the given key index

@param newNetKey Network key
@throws IllegalArgumentException if the key already exists.
mesh/src/main/java/no/nordicsemi/android/mesh/BaseMeshNetwork.java