{
TestPage testPage = new TestPage();
testPage.textField.setOutputMarkupId(true);
testPage.textField.setType(String.class);
testPage.textField.setRequired(true);
testPage.textField.add(new HTML5Attributes());
tester.startPage(testPage);
TagTester tagTester = tester.getTagById(testPage.textField.getMarkupId());
String required = tagTester.getAttribute("required");
assertEquals("required", required);