Polished HttpBuilderUtil.groovy and wrote a test class for it.