So my problem was that mainCalculateReturnsAfterRefactor is a static function and calculateAnnualizedReturn is non-static. A non-static method could not be directly refrenced.
I followed this
Now to make an object , I needed the constructor which was protected , so i changed it to public.
Everything working fine with 14 tests passing and 1 failing (It was written some might fail).
My only doubt is if I am on the right track because it was written that do not change the cronstructor whereas I changed it to public from protected??