Unable to mock groovyx.net.http.HTTPBuilder using mockFor() and createMock(). After invoking createMock() a URISyntaxException is thrown.
It appears that at line 90 and 91 of GrailsMock it is calling asType(HTTPBuilder) on an empty map. Because asType is being invoked on a Map, DefaultTypeTransformation.castToType(Object, Class) chooses to invoke a constructor with a single Map parameter (see line 321). This results in the invocation of the constructor HTTPBuilder(Object) with the Map as the default URI. The URIBuilder attempts to convert the Map to a URI and eventually the process throws a URISyntaxException. Ideally, the no arg constructor should be called on HTTPBuilder.
This problem is occurring with http-builder 0.5.2.
Here's the stacktrace.