code: public static Collection<MonetaryAmountFactory<?>> getAmountFactories(MonetaryAmountFactoryQuery query) {
          return Optional.ofNullable(monetaryAmountsSingletonQuerySpi()).orElseThrow(() -> new MonetaryException(
                  "No MonetaryAmountsSingletonQuerySpi loaded, query functionality is not available."))
                  .getAmountFactories(query);
      }
docs: Returns all factory instances that match the query.
  
  @param query the factory query, not null.
  @return the instances found, never null.