I am writing a library for OVH api calls, and I am wondering how to make it friendly for unit tests. I have a class APIClient. The constructor of this class initializes the object with all parameters, but then immediately tries to perform authentication. There is also the send method for sending generic authenticated API requests. The thing is: I have some private helper methods used throughough the code, like toHex that transforms bytes into hex, hash that is a shorthand to do a SHA1 hash of a given string, and parseJson that parses a json out of the http response using an external dependency, that is javax.json. Should I move those utilities to another utility class as static methods to be able to test them separately without creating full api client objects? I don't think I will use those methods anywhere else.
Update:
When performing authentication and sending requests, it usually looks like: build json objects, serialize json, create and send http request with appropriate headers, get response, parse response as json, extract data. Although the details differ as all requests after authentication are actually signed. edit2: this is a rest service