class BgpSessionProperties {

  @VisibleForTesting
  static EnumSet<Type> getAddressFamilyIntersection(BgpPeerConfig a, BgpPeerConfig b) {
    Set<Type> setA =
        a.getAllAddressFamilies().stream()
            .map(AddressFamily::getType)
            .collect(Sets.toImmutableEnumSet());
    Set<Type> setB =
        b.getAllAddressFamilies().stream()
            .map(AddressFamily::getType)
            .collect(Sets.toImmutableEnumSet());
    Collection<Type> intersection = Sets.intersection(setA, setB);
    // need to special case empty collection, otherwise exception
    return intersection.isEmpty() ? EnumSet.noneOf(Type.class) : EnumSet.copyOf(intersection);
  }

  private  BgpSessionProperties(
      Collection<Type> addressFamilies,
      Map<Type, RouteExchange> routeExchangeSettings,
      long tailAs,
      long headAs,
      Ip tailIp,
      Ip headIp,
      SessionType sessionType,
      ConfedSessionType confedType);

}