Proposed Design

Benefit of this design-

1. Take care the Single Responsibility principle. V2 and V3 base code is in different classes.

2. Avoid lot of “if, else” condition.

3. Leads to minimal changes required in existing code. None of the V2 API test classes needs to be changed for their base class name etc.

Note- Diamond problem can be overcome from this design by MRO.