code: @SuppressWarnings("rawtypes")
  	public static MonetaryAmountFactory getAmountFactory(MonetaryAmountFactoryQuery query) {
          return Optional.ofNullable(monetaryAmountsSingletonQuerySpi()).orElseThrow(() -> new MonetaryException(
                  "No MonetaryAmountsSingletonQuerySpi loaded, query functionality is not available."))
                  .getAmountFactory(query);
      }
docs: Executes the query and returns the factory found, if there is only one factory.
  If multiple factories match the query, one is selected.
  
  @param query the factory query, not null.
  @return the factory found, or null.