In build I get two test failed -
com.crio.warmup.stock.portfolio.PortfolioManagerTest > calculateExtrapolatedAnnualizedReturn() FAILED
org.mockito.exceptions.base.MockitoException
com.crio.warmup.stock.portfolio.PortfolioManagerPerformanceTest > calculateExtrapolatedAnnualizedReturn() FAILED
org.mockito.exceptions.base.MockitoException
I tried to find out the reason but cant find out. There is the following code -
List<String> symbols = annualizedReturns.stream().map(AnnualizedReturn::getSymbol)
.collect(Collectors.toList());
Assertions.assertEquals(0.814, annualizedReturns.get(0).getAnnualizedReturn(), 0.01);
Assertions.assertEquals(0.584, annualizedReturns.get(1).getAnnualizedReturn(), 0.01);
Assertions.assertEquals(0.33, annualizedReturns.get(2).getAnnualizedReturn(),0.01);
Assertions.assertEquals(Arrays.asList(new String[]{"AAPL", "MSFT", "GOOGL"}), symbols);
According to previous modules we implemented logic to get sorted list of AnnualizedReturns
and I also implemented the exception properly, but I cant understand why these test failed.
@gouravsardana, @chandra-kiran_crio, @Sakshat-Crio.Do, @chandra-kiran_crio