code: private Promise<PeerSession> pickCachedSession(int uid, final int keyGroupId) {
          return ManagedList.of(peerSessions.getValue(uid))
                  .flatMap(PeerSessionsStorage.SESSIONS)
                  .filter(PeerSession.BY_THEIR_GROUP(keyGroupId))
                  .sorted(PeerSession.COMPARATOR)
                  .firstPromise();
      }
docs: Picking cached session
  
  @param uid        User's id
  @param keyGroupId Key Group Id
  @return promise of session