Refactoring for EllipticsTestHelper class