### Question:
Relation { public void addPeople(People p) { if ( this.peoples.size() >= MAX_RELATION ) { String oldestName = this.peoples.keySet().iterator().next(); People oldest = findPeopleByUserName(oldestName); this.removePeople(oldest); } this.peoples.put(p.username, p); synchronized ( changedFlag ) { changedFlag.add(p.username); } }  UserId get_id(); void set_id(UserId _id); RelationType getType(); void setType(RelationType type); People removePeople(People p); void addPeople(People p); void modifyPeople(People p); People findPeopleByUserName(String name); Collection<People> listPeople(); User getParentUser(); void setParentUser(User parentUser); Set<String> clearChangeMark(); String toString(); Collection<FriendInfoLite> toBseFriendList(); static final int MAX_RELATION; }### Answer:
@Test public void testAddPeople() { Relation relation = makeRelation(3); ArrayList<People> list = convertToList(relation.listPeople()); assertEquals(3, list.size()); relation.clearChangeMark(); relation.addPeople(makePeople("test999")); Set<String> flags = relation.clearChangeMark(); assertEquals(1, flags.size()); assertEquals("test999", flags.iterator().next()); assertEquals(0, relation.clearChangeMark().size()); }