@Test
public void testPrintThreeAttributes() throws Exception {

    List<ClassDescriptor> cds = new ArrayList<ClassDescriptor>();
    List<AttributeDescriptor> ads = new ArrayList<AttributeDescriptor>();
    ads.add(new AttributeDescriptor("testatt", "java.lang.String", null));
    ads.add(new AttributeDescriptor("testatt2", "java.lang.String", null));
    ads.add(new AttributeDescriptor("testatt3", "java.lang.String", null));
    cds.add(
        new ClassDescriptor(
            "testns.testclass", null, false,
            ads,
            new HashSet<ReferenceDescriptor>(),
            new HashSet<CollectionDescriptor>(), null));
    Model m = new Model("model1", "testns", cds);
    PathQuery pq = new PathQuery(m);
    pq.addViews("testclass.testatt", "testclass.testatt2", "testclass.testatt3");
    String result = cg.generate(new WebserviceCodeGenInfo(pq, null, null, null, true, null, "\n"));
    String[] lines = result.split("\n");
    int expectedLines = 27;
    Assert.assertEquals(expectedLines, lines.length);
    Assert.assertEquals(
        "print(row[\"testatt\"], row[\"testatt2\"], row[\"testatt3\"])", lines[expectedLines - 1].trim());
    // System.out.println(result);
}