public Group createGroup(@NonNull final Provisioner provisioner, final int address, @NonNull final String name) throws IllegalArgumentException {
        if (MeshAddress.isValidVirtualAddress(address)) {
            throw new IllegalArgumentException("Call addGroup(@NonNull final Group group) to create a group with group address label");
        }

        if (provisioner.getAllocatedGroupRanges().isEmpty()) {
            throw new IllegalArgumentException("Unable to create group," +
                    " there is no group range allocated to the current provisioner");
        }

        if (!isAddressInAnyRanges(provisioner.getAllocatedGroupRanges(), address)) {
            throw new IllegalArgumentException("Unable to create group, " +
                    "the address is outside the range allocated to the provisioner");
        }

        final Group group = new Group(address, meshUUID);
        if (!TextUtils.isEmpty(name))
            group.setName(name);
        return group;
    }
Creates with a given address and name.

@param address Address of the group which must be within the allocated range
@param name    Friendly name of the group
@return true if the group was successfully added and false otherwise since a group may already exist with the same group address
@throws IllegalArgumentException if there is no group range allocated or if the address is out of the range allocated to the provisioner
mesh/src/main/java/no/nordicsemi/android/mesh/MeshNetwork.java