refactoring TestRESTAPI to not hold so many pooled connex indefinitely