@Test
  public void testTooBig() throws Exception {
    Class<?> instrumenteeClass =
        InstrumentingClassLoader.getInstrumenteeClass(
            AllocationInstrumenterTest.class.getName().replace('.', '/'),
            "recorder",
            "com.google.monitoring.runtime.instrumentation.MuchTooBig");

    Object tempo = instrumenteeClass.newInstance();
    Method m;

    // Just to make sure nothing happens.
    m = instrumenteeClass.getMethod("allocateLongArray", Integer.TYPE);
    assertNotNull(m);
    long[] ia = (long[]) m.invoke(tempo, 27);
    expectedEventList.add(new Event(27, "long", ia));

    assertTrue(
        "List contains: " + actualEventList + " but should be empty", actualEventList.isEmpty());
  }
This method tests to make sure that a class that is too big to get instrumented doesn't get
instrumented.
src/test/java/com/google/monitoring/runtime/instrumentation/AllocationInstrumenterTest.java