JavassistUtils { public static String getNextUniqueClassName() { return String.format("%s.cli_%s_%d", PREFIX_PACKAGE, uniqueId, objectCounter++); } private  JavassistUtils(); static AnnotationsAttribute cloneAnnotationsAttribute(
      final ConstPool constPool,
      final AnnotationsAttribute attr,
      final ElementType validElementType); static CtMethod findMethod(final CtClass clz, final Method m); static void copyClassAnnotations(final CtClass oldClass, final CtClass newClass); static void copyMethodAnnotationsToField(final CtMethod method, final CtField field); static String getNextUniqueClassName(); static String getNextUniqueFieldName(); static CtClass generateEmptyClass(); static final String PREFIX_PACKAGE; }
@Test public void testGetNextUniqueClassName() { final String unique1 = JavassistUtils.getNextUniqueClassName(); final String unique2 = JavassistUtils.getNextUniqueClassName(); Assert.assertFalse(unique1.equals(unique2)); }