private void doTestIntField(int value) throws Exception {
String name = "intfield";
boolean mandatory = false;
int defaultInt = 47;
IntField field = new IntField(name, mandatory, defaultInt);
field.setValueFromInt(value);
boolean highlightError = false;
String snippet = field.getSnippet(new UpcasingResourceBundle(), highlightError);
XmlParseUtil.validateXhtml(snippet);
assertTrue(snippet.contains("name=\"" + name + "\""));
assertTrue(snippet.contains("input"));
assertTrue(snippet.contains("type=\"text\""));
assertTrue(snippet.contains("value=\"" + value + "\""));
assertEquals(value, field.getIntegerValue().intValue());
assertTrue(snippet.contains(name.toUpperCase()));
assertTrue(snippet.contains(name));
}