title: Can Spock Mock a Java constructor
body: <p>Trying to broaden the appeal of Spock at work and run into this issue.  Actually trying to write Unit Tests for a Groovy class, but one that calls out to Java.  A static method calls a private constructor.  The code looks like:</p>
  
  <pre><code>private MyConfigurator(String zkConnectionString){
      solrZkClient = new SolrZkClient(zkConnectionString, 30000, 30000,
              new OnReconnect() {
                  @Override
                  public void command() { . . . }
              });
  }
  </code></pre>
  
  <p>"SolrZkClient" is from third party (Apache) Java library.  Since it tries to connect to ZooKeeper, I would like to mock that out for this Unit Test (rather than running one internally as part of the unit test).   </p>
  
  <p>My test gets to the constructor without difficulty, but I can't get past that ctor:</p>
  
  <pre><code>def 'my test'() {
      when:
          MyConfigurator.staticMethodName('hostName:2181')
      then:
          // assertions
  }
  </code></pre>
  
  <p>Is there anyway to do this?</p>