@Override
    public FieldList addFields(int... fieldIDs) {
        if (fieldIDs == null || fieldIDs.length == 0) {
            return this;
        }
        if (size() == 0) {
            return new FieldList(fieldIDs);
        } else {
            ArrayList<Integer> list = new ArrayList<Integer>(size() + fieldIDs.length);
            list.addAll(this.collection);
            for (int i = 0; i < fieldIDs.length; i++) {
                list.add(fieldIDs[i]);
            }

            return new FieldList(Collections.unmodifiableList(list));
        }
    }
@Test
    void testAddSetToList() {
        check(new FieldList().addFields(new FieldSet(1)).addFields(2), 1, 2);
        check(new FieldList().addFields(1).addFields(new FieldSet(2)), 1, 2);
        check(new FieldList().addFields(new FieldSet(2)), 2);
    }