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