Reduce code duplication between the test proxy servers