static MembersView cloneAdding(MembersView source, Collection<MemberInfo> newMembers) {
        List<MemberInfo> list = new ArrayList<>(source.size() + newMembers.size());
        list.addAll(source.getMembers());
        int newVersion = max(source.version, source.size());
        for (MemberInfo newMember : newMembers) {
            MemberInfo m = new MemberInfo(newMember.getAddress(), newMember.getUuid(), newMember.getCPMemberUUID(),
                    newMember.getAttributes(), newMember.isLiteMember(), newMember.getVersion(), ++newVersion,
                    newMember.getAddressMap());
            list.add(m);
        }

        return new MembersView(newVersion, unmodifiableList(list));
    }
@Test
    public void cloneAdding() {
        int version = 6;
        MemberImpl[] members = MemberMapTest.newMembers(4);
        List<MemberInfo> additionalMembers
                = Arrays.asList(new MemberInfo(newMember(6000)), new MemberInfo(newMember(7000)));

        MembersView view =
                MembersView.cloneAdding(MembersView.createNew(version, Arrays.asList(members)), additionalMembers);

        assertEquals(version + additionalMembers.size(), view.getVersion());

        MemberImpl[] newMembers = Arrays.copyOf(members, members.length + additionalMembers.size());
        for (int i = 0; i < additionalMembers.size(); i++) {
            newMembers[members.length + i] = additionalMembers.get(i).toMember();
        }

        assertMembersViewEquals(newMembers, view);
    }