/**
   * Tests that class file enhancement works.
   *
   * @throws Exception in case the test fails.
   */
  @Test
  public void testEnhancement() throws Exception {
    // sanity check that the class is unmodified and does not contain getFieldHandler()
    assertFalse(implementsManaged(Simple.class));

    Class clazz = loader.loadClass(entities.get(0));

    // enhancement would have added the ManagedEntity interface...
    assertTrue(implementsManaged(clazz));
  }