@Test
public void testSupportsGenericsSourceFromAddedMethod() throws Exception {
JavaClassSource source = Roaster.parse(JavaClassSource.class, "public class Test{}");
// Add a new method to get JDT to recognize the new ASTs
source.addMethod().setName("test").setBody("java.util.List<String> s = new java.util.ArrayList<String>(); for (String item : s){}");
// Forces a rewrite to happen via AbstractJavaSource
source.toString();
Assert.assertFalse(source.hasSyntaxErrors());
}
}