docs: static void filterUnwantedReferences(List<JpaRef> result, Collection<BeanId> query) {
          ListIterator<JpaRef> it = result.listIterator();
          while (it.hasNext()) {
              // remove reference from result that was not part of the query
              BeanId found = it.next().getSource();
              if (!query.contains(found)) {
                  it.remove();
              }
          }
      }