ParsedStrategy { public Ratio getPermittedShare(final Rating rating) { if (portfolio.containsKey(rating)) { return portfolio.get(rating) .getPermitted(); } else { return defaults.getPortfolio() .getDefaultShare(rating); } } ParsedStrategy(final DefaultPortfolio portfolio);   ParsedStrategy(final DefaultValues values);   ParsedStrategy(final DefaultPortfolio portfolio, final Collection<MarketplaceFilter> filters);   ParsedStrategy(final DefaultValues values, final Collection<MarketplaceFilter> filters);   ParsedStrategy(final DefaultValues values, final FilterSupplier filters);   ParsedStrategy(final DefaultValues defaults, final Collection<PortfolioShare> portfolio,
            final Map<Rating, MoneyRange> investmentSizes, final Map<Rating, MoneyRange> purchaseSizes);  ParsedStrategy(final DefaultValues defaults, final Collection<PortfolioShare> portfolio,
            final Map<Rating, MoneyRange> investmentSizes,
            final Map<Rating, MoneyRange> purchaseSizes, final FilterSupplier filters); int getMinimumInvestmentShareInPercent(); int getMaximumInvestmentShareInPercent(); Money getMaximumInvestmentSize(); Optional<RoboZonkyVersion> getMinimumVersion(); void setMinimumVersion(final RoboZonkyVersion minimumVersion); Ratio getPermittedShare(final Rating rating); Money getMinimumInvestmentSize(final Rating rating); Money getMaximumInvestmentSize(final Rating rating); Money getMinimumPurchaseSize(final Rating rating); Money getMaximumPurchaseSize(final Rating rating); Stream<LoanDescriptor> getApplicableLoans(final Stream<LoanDescriptor> l,
            final PortfolioOverview portfolioOverview); Stream<ReservationDescriptor> getApplicableReservations(final Stream<ReservationDescriptor> r,
            final PortfolioOverview portfolioOverview); Stream<ParticipationDescriptor> getApplicableParticipations(final Stream<ParticipationDescriptor> p,
            final PortfolioOverview portfolioOverview); boolean isPurchasingEnabled(); boolean isInvestingEnabled(); Optional<ReservationMode> getReservationMode(); Optional<SellingMode> getSellingMode(); Stream<InvestmentDescriptor> getMatchingSellFilters(final Stream<InvestmentDescriptor> i,
            final PortfolioOverview portfolioOverview); Stream<InvestmentDescriptor> getMatchingPrimaryMarketplaceFilters(final Stream<InvestmentDescriptor> i,
            final PortfolioOverview portfolioOverview); @Override String toString();  }
@Test void shares() { final DefaultPortfolio portfolio = DefaultPortfolio.EMPTY; final DefaultValues values = new DefaultValues(portfolio); final PortfolioShare share = new PortfolioShare(Rating.D, Ratio.fromPercentage(100)); final ParsedStrategy strategy = new ParsedStrategy(values, Collections.singleton(share), Collections.emptyMap(), Collections.emptyMap()); assertThat(strategy.getPermittedShare(Rating.D)).isEqualTo(Ratio.ONE); }