### Question:
Tools { public static boolean isClassAccessChange(final int oldAccess, final int newAccess) { if ( not(oldAccess, Opcodes.ACC_ABSTRACT) && has(newAccess, Opcodes.ACC_ABSTRACT) ) { return true; } else if ( not(oldAccess, Opcodes.ACC_FINAL) && has(newAccess, Opcodes.ACC_FINAL) ) { return true; } else { final int compatibleChanges = Opcodes.ACC_ABSTRACT | Opcodes.ACC_FINAL ; final int oldAccess2 = oldAccess & ~compatibleChanges; final int newAccess2 = newAccess & ~compatibleChanges; return oldAccess2 != newAccess2; } } private  Tools(); static final String getClassName(String internalName); static boolean isAccessChange(int oldAccess, int newAccess); static boolean isClassAccessChange(final int oldAccess, final int newAccess); static boolean isFieldAccessChange(final int oldAccess, final int newAccess); static boolean isMethodAccessChange(final int oldAccess, final int newAccess);  }### Answer:
@Test public void isClassAccessChange() { assertTrue(Tools.isClassAccessChange(0, Opcodes.ACC_FINAL)); assertTrue(Tools.isClassAccessChange(0, Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL)); assertFalse(Tools.isClassAccessChange(Opcodes.ACC_FINAL, 0)); assertFalse(Tools.isClassAccessChange(Opcodes.ACC_FINAL + Opcodes.ACC_PUBLIC, Opcodes.ACC_PUBLIC)); assertTrue(Tools.isClassAccessChange(Opcodes.ACC_FINAL + Opcodes.ACC_PUBLIC, 0)); assertTrue(Tools.isClassAccessChange(Opcodes.ACC_PUBLIC, Opcodes.ACC_PROTECTED)); assertFalse(Tools.isClassAccessChange(Opcodes.ACC_ABSTRACT, 0)); assertFalse(Tools.isClassAccessChange(Opcodes.ACC_ABSTRACT + Opcodes.ACC_PUBLIC, Opcodes.ACC_PUBLIC)); assertFalse(Tools.isClassAccessChange(Opcodes.ACC_ABSTRACT + Opcodes.ACC_PROTECTED, Opcodes.ACC_PROTECTED)); assertTrue(Tools.isClassAccessChange(0, Opcodes.ACC_ABSTRACT)); assertTrue(Tools.isClassAccessChange(Opcodes.ACC_PUBLIC, Opcodes.ACC_PUBLIC + Opcodes.ACC_ABSTRACT)); assertTrue(Tools.isClassAccessChange(Opcodes.ACC_PROTECTED, Opcodes.ACC_PROTECTED + Opcodes.ACC_ABSTRACT)); }