Not sure how robust and designed you want this module to be... In Picasso and Retrofit we share HttpUrlConnection and OkHttp code by having a method like this:
```java
protected abstract HttpUrlConnection openConnection(URL url);
```
Then you can have subclasses (maybe as static inner classes) for the two implementations which are only ~5 lines each.