private ImmutableSet<Long> nextPages(SiteConfig siteConfig) {
    ImmutableSet.Builder<Long> pages = ImmutableSet.builder();
    for (Map.Entry<String, PageConfig> entry : siteConfig.getPages().entrySet()) {
      PageConfig pageConfig = entry.getValue();
      double r = random.nextDouble();
      if (r < pageConfig.getWeight()) {
        pages.add(Long.parseLong(entry.getKey()));
      }
    }
    return pages.build();
  }