### Question:
AsmAdaptor { public static boolean isEnhanced(final byte[] b) { if (b == null) { return false; } final ClassReader cr = new ClassReader(b); try { cr.accept(new ClassVisitor(Opcodes.ASM8) { @Override public void visit(final int i, final int i1, final String name, final String s, final String parent, final String[] interfaces) { boolean enhanced = interfaces != null && interfaces.length > 0 && asList(interfaces).contains("org/apache/openjpa/enhance/PersistenceCapable"); if (!enhanced && name != null && parent != null && !"java/lang/Object".equals(parent) && !name.equals(parent)) { enhanced = isEnhanced(bytes(parent)); } throw new EnhancedStatusException(enhanced); } }, 0); return false; } catch (final EnhancedStatusException e) { return e.status; } catch (final Exception e) { return false; } }  @SuppressWarnings("deprecation") static void write(BCClass bc); static void write(BCClass bc, File outFile); static void write(BCClass bc, OutputStream os); static byte[] toByteArray(BCClass bc, byte[] returnBytes); static boolean isEnhanced(final byte[] b);  }### Answer:
@Test public void isEnhanced() { assertTrue(AsmAdaptor.isEnhanced(bytes(Enhanced.class))); assertTrue(AsmAdaptor.isEnhanced(bytes(TransitivelyEnhanced.class))); assertFalse(AsmAdaptor.isEnhanced(bytes(NotEnhanced.class))); }