public void testComplex() throws Exception
{
String expr = "@org.jboss.test.annotation.factory.support.Complex(ch='a', string=\"Test123\", flt=9.9, dbl=123456789.99, shrt=1, lng=987654321, integer=123, bool=true, annotation=@org.jboss.test.annotation.factory.support.SimpleValue(\"Yes\"), array={\"Test\", \"123\"}, clazz=java.lang.Long.class, enumVal=org.jboss.test.annotation.factory.support.MyEnum.TWO, primitiveArray={1,2,3})";
Annotation annotation = (Annotation)AnnotationCreator.createAnnotation(expr, Complex.class);
assertEquals(Complex.class, annotation.annotationType());
Complex complex = (Complex)annotation;
assertEquals('a', complex.ch());
assertEquals("Test123", complex.string());
assertEquals(9,9, complex.flt());
assertEquals(123456789.99, complex.dbl());
assertEquals(1, complex.shrt());
assertEquals(987654321, complex.lng());
assertEquals(123, complex.integer());
assertEquals(true, complex.bool());
assertEquals(Long.class, complex.clazz());
assertEquals("Yes", complex.annotation().value());
assertEquals(new String[]{"Test", "123"}, complex.array());
assertEquals(MyEnum.TWO, complex.enumVal());
assertArrays(new int[]{1, 2, 3}, complex.primitiveArray());
}