Todo not clear confusion

As a first step, Create appropriate instance of StoockQuoteService using
// StockQuoteServiceFactory and then use the same instance of StockQuoteService to create the
// instance of PortfolioManager.

I didn’t get what it imples?

ok @ajraj27 i will break it down for you and

  • Create a instance of StockQuoteService using or by calling StockQuoteServiceFactory INSTANCE under getPortfolioManager function
  • and then use the same INSTANCE of StockQuoteService which you have created earlier to return the INSTANCE of PortfolioManager.

Hey @ajraj27 inshort create a instance of StockQuoteService by using StockQuoteServiceFactory INSTANCE and then use that instance to return the instance of PortfolioManager by passing StockQuoteService instance as its argument.

@ajraj27 As there is no response from your side on this topic for a long time, hoping that your issue is resolved, I am closing this topic.

If the issue still exists or for further queries you can create a new topic and continue there.

Heyy I am doing the same thing but while running the tests for portfolioManagerImpl class I am getting Mockito exception…stuck since yesterday but unable to debug it.