public AllocatedGroupRange nextAvailableGroupAddressRange(final int rangeSize) {
        final List<AllocatedGroupRange> ranges = new ArrayList<>();
        for (Provisioner provisioner : provisioners) {
            ranges.addAll(provisioner.getAllocatedGroupRanges());
        }
        Collections.sort(ranges, groupRangeComparator);
        return getNextAvailableGroupRange(rangeSize,
                new AllocatedGroupRange(MeshAddress.START_GROUP_ADDRESS, MeshAddress.END_GROUP_ADDRESS), ranges);
    }
Returns the next unicast address for a provisioner based on the allocated range and the number of elements

@param rangeSize Range size
mesh/src/main/java/no/nordicsemi/android/mesh/MeshNetwork.java