assertEquals("public", modifiers[1]);
}
public void testAddMethodsToCorrectClass() throws Exception {
builder.beginClass(new ClassDef());
builder.addMethod(new MethodDef());
builder.endClass();
builder.beginClass(new ClassDef());
builder.addMethod(new MethodDef());
builder.addMethod(new MethodDef());
builder.addMethod(new MethodDef());
builder.endClass();
builder.beginClass(new ClassDef());
builder.addMethod(new MethodDef());
builder.addMethod(new MethodDef());
builder.endClass();
JavaSource source = builder.getSource();
assertEquals(1, source.getClasses()[0].getMethods().length);
assertEquals(3, source.getClasses()[1].getMethods().length);