UserInfo user = new UserInfo();
user.setUniqueId("A");
user.setUserName("carlos");
metaStore.createUser(user);
SiteInfo site1 = SiteInfo.newSiteConfiguration(user, "site1", "myworkspace");
site1.setId("s1");
site1.setName("Site 1");
site1.setHostHint("foo");
site1.save(user);
SiteInfo site2 = SiteInfo.newSiteConfiguration(user, "site2", "myworkspace");
site1.setId("s2");
site2.setName("Site 2");
site2.setHostHint("foo");
site2.save(user);
hostingService.start(site1, user, "http://whatever/dontcare", new URI("http", null, "test", 80, null, null, null));
hostingService.start(site2, user, "http://whatever/dontcare", new URI("http", null, "test", 80, null, null, null));
// Expect: site1 acquires the "foo" URL, and site2 has to settle for foo + {suffix "0"}