public void testNotRewindingWithOnlick() {
Mock formMock = getFormMock(false);
Html4Button button = getButton(formMock, null, false, "void(0)");
StringWriter strWriter = new StringWriter();
PrintWriter writer = new PrintWriter(strWriter);
button.renderFormComponent(new MarkupWriterImpl("UTF-8", writer, new AsciiMarkupFilter()), new RequestCycle());
writer.flush();
formMock.verify();
String hiddenName = FORM_NAME + "_ctrl";
assertEquals("<input type=\"hidden\" name=\"" + hiddenName + "\"></input><button type=\"" + TYPE + "\" name=\"" + FORM_NAME + "\" value=\"" + LABEL + "\" onclick=\"document." + FORM_NAME + "." + hiddenName + ".value='x'; void(0)\"><em>body</em></button>", strWriter.toString());
}