How test case output become 0.0001

total return = (11000 - 10000) / 10000 = 0.1

But test case output is 0.0001 .

How this kind of maths works ?

I think the test case output given here is not for the total return but for the annualized return whose value is 0.0322, and the value 0.0001 is something else.

It’s the acceptable error in your output. It means values between 0.0322-0.0001 and 0.0322+0.0001 will be classified as correct answers.


The third parameter of Assertions.assertEquals() function is the difference from 0.0322 we will be willing to allow

0.0001 is the delta i.e the variation allowed between expected and actual output.

Hi, please close this topic if you found your answer.