PortofolioService { public Portofolio createPortofolio(String login, String baseCurrencyCode, int baseCurrencyAmount) { UserEntity ue = userRepo.findByUsername(login); SymbolEntity se = symbolRepo.findById(baseCurrencyCode).get(); PortofolioEntity pe = new PortofolioEntity(ue, se, BigDecimal.valueOf(baseCurrencyAmount)); portofolioRepo.save(pe); return getPortofolio(login); }  Portofolio createPortofolio(String login, String baseCurrencyCode, int baseCurrencyAmount); AssetInfo getBaseCurrency(String login); Portofolio getPortofolio(String login); OrderInfo getOrderInfo(String login, String symbolCode, double quantity); List<Symbol> getAvailableSymbols(String login); Order buy(String login, String code, double quantity); Order sell(String login, String code, double quantity);  }
@Sql("/sql/insert_user_symbol.sql") @Test public void testCreatePortofolio() { String login = "user"; String baseCurrency = EUR; int amount = 1000; Portofolio p = portofolioService.createPortofolio(login, baseCurrency, amount); assertThat(p.getBaseCurrency().getSymbol().getCode()).isEqualTo(baseCurrency); assertThat(p.getBaseCurrency().getQuantity()).isEqualTo(amount); }