code: public void setUpBenchmark(Object benchmarkInstance) throws UserCodeException {
      boolean setupSuccess = false;
      try {
        callSetUp(benchmarkInstance);
        setupSuccess = true;
      } finally {
        // If setUp fails, we should call tearDown. If this method throws an exception, we
        // need to call tearDown from here, because no one else has the reference to the
        // Benchmark.
        if (!setupSuccess) {
          callTearDown(benchmarkInstance);
        }
      }
    }
docs: TODO(gak): use these methods in the worker as well