}
@Test
public void label_error_with_existing_class_attribute()
{
MarkupWriter writer = new MarkupWriterImpl(new XMLMarkupModel(), null);
Environment env = newEnvironment();
Field field = newField();
ValidationTracker tracker = newValidationTracker();
train_peekRequired(env, ValidationTracker.class, tracker);
train_inError(tracker, field, true);
replay();
Element e = writer.element("label", "accesskey", "f", "class", "foo");
ValidationDecorator decorator = new DefaultValidationDecorator(env);
decorator.insideLabel(field, e);
assertEquals(writer.toString(), "<label accesskey=\"f\" class=\"foo t-error\"/>");
verify();
}