@Test
  public void testInstrumentationDoesNotRetainLocalReference() throws InterruptedException {
    final CountDownLatch c = new CountDownLatch(1);
    Object o =
        new Object() {
          @Override
          public void finalize() {
            c.countDown();
          }
        };
    ObjectHolder unused = new ObjectHolder(o);
    unused = null;
    o = null;
    GcFinalization.await(c);
  }
Additional tests for the allocation instrumenter.
src/test/java/com/google/monitoring/runtime/instrumentation/InstrumenterRefTest.java