public class AnnotatedClassTest {
@Test
public void testStringA() throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, NoSuchFieldException {
ClassReplacer rep = new ClassReplacer();
rep.queueClassForReplacement(StringC.class, StringC1.class);
rep.replaceQueuedClasses();
StringC ns = new StringC();
Class c = StringC.class;
Assert.assertFalse(ns.getClass().isAnnotationPresent(StringA.class));
Field field = c.getDeclaredField("field");
Assert.assertTrue(field.isAnnotationPresent(StringA.class));