MemberMap toMemberMap() {
        MemberImpl[] m = new MemberImpl[size()];
        int ix = 0;
        for (MemberInfo memberInfo : members) {
            m[ix++] = memberInfo.toMember();
        }
        return MemberMap.createNew(version, m);
    }
@Test
    public void toMemberMap() {
        int version = 5;
        MemberImpl[] members = MemberMapTest.newMembers(3);
        MembersView view = MembersView.createNew(version, Arrays.asList(members));

        MemberMap memberMap = view.toMemberMap();

        assertEquals(version, memberMap.getVersion());
        assertMembersViewEquals(memberMap.getMembers().toArray(new MemberImpl[0]), view);
    }