@Test public void addOpenId() { User user = new User("user", "password", "email", false); Set<OpenId> openIds = Sets.newHashSet( new OpenId("openId1", "realId1"), new OpenId("openId2", "realId2")); for (OpenId openId : openIds) { user.addOpenId(openId); } OpenId newOpenId = new OpenId("openId3", "realId3"); user.addOpenId(newOpenId); openIds.add(newOpenId); assertEquals(openIds, user.getOpenIds()); }
public void addOpenId(OpenId openId) { openIds.add(openId); }
User { public void addOpenId(OpenId openId) { openIds.add(openId); } }
User { public void addOpenId(OpenId openId) { openIds.add(openId); } User(String loginName, String password, String email, boolean disabled); }
User { public void addOpenId(OpenId openId) { openIds.add(openId); } User(String loginName, String password, String email, boolean disabled); void addOpenId(OpenId openId); void removeOpenId(String openId); }
User { public void addOpenId(OpenId openId) { openIds.add(openId); } User(String loginName, String password, String email, boolean disabled); void addOpenId(OpenId openId); void removeOpenId(String openId);  }