java.lang.IllegalArgumentException at PortfolioManagerTest.java:104

com.crio.warmup.stock.portfolio.PortfolioManagerTest > calculateExtrapolatedAnnualizedReturn() FAILED
Continuously getting this error all other test cases are passed!

Refer to this FAQ to understand what a Illegal Argument Exception is.
https://forum.crio.do/t/error-illegalargumentexception/7999/2

Add a breakpoint in your code, and debug it.
https://forum.crio.do/t/how-to-use-the-debugger-in-vs-code-for-java/7092/2

Tried all things but didn’t get anything !

You are not doing the todo’s properly
have you sorted

Yes, I have sorted the list but still getting the same error

I just checked your code, Where have you sorted it?

I have sorted it in PortfolioManagerApplication.java file and I have verified the same as I am getting the same result as in Module3.

You have writtern your application in Impl file :), you should sort it there

Sorted the returned Array in Impl file, but again the same error.

you have to used getquotesfunction also in impl file instead of calling api.

Just complete getquotesfunction and then call this in your annualized function in impl file.

1 Like

It’s been more than 12 hours hours now and there is no response from your side. I am closing this ticket, if you face any issue please feel free to raise a new query.