@Test
public void testGenerateEmptyClass() {

  final CtClass emptyClass = JavassistUtils.generateEmptyClass();
  final CtClass anotherEmptyClass = JavassistUtils.generateEmptyClass();
  Assert.assertFalse(emptyClass.equals(anotherEmptyClass));
  // test empty class works as expected
  final CtMethod method = addNewMethod(emptyClass, "a");
  annotateMethod(method, "abc", 7);
  final CtField field = addNewField(emptyClass, "d");
  annotateField(field, "def", 9);
  Assert.assertEquals(
      7,
      ((IntegerMemberValue) ((AnnotationsAttribute) method.getMethodInfo().getAttribute(
          AnnotationsAttribute.visibleTag)).getAnnotation("java.lang.Integer").getMemberValue(
              "abc")).getValue());
  Assert.assertEquals(
      9,
      ((IntegerMemberValue) ((AnnotationsAttribute) field.getFieldInfo().getAttribute(
          AnnotationsAttribute.visibleTag)).getAnnotation("java.lang.Integer").getMemberValue(
              "def")).getValue());
}