I have got 4 classes lets says A, B, C, D each calling on methods from another one.
now I have mocked class A, and want to mock a method using mockito
A
The answer by Abhijeet is technically correct, but it is important to understand: you should not be doing this.
Your "production" code is heavily violating the Law of Demeter: your class A should not know that it has to get a B to get a C to get a D.
That simply leads to super tight coupling between all these classes. Not a good idea.
In that sense: you should see the fact that you need to do special things here to get your test working as an indication that your production code does something that is out of the normal.
So, instead of "fixing" your test setup, consider addressing the real problem. And that is the design of your production code!
And for the record: getB().getC().getD() is not a "recursive" call; it is more of a "fluent" chaining of method calls. And as said: that is not a good thing.