### Question:
ElementStub { public String toString() { StringBuffer sb = new StringBuffer(); boolean start = true; for (Object o : identifiers) { if (!start) { sb.append(", "); sb.append(getArgument(o, -1)); } else { sb.append(getArgument(o, index)); } start = false; } return "_sahi._" + elementType + "(" + sb.toString() + ")"; } ElementStub(String elementType, Browser browser, Object... args); String toString(); void click(); void doubleClick(); void rightClick(); void check(); void uncheck(); void focus(); void removeFocus(); void dragAndDropOn(ElementStub dropElement); void dragAndDropOn(int x, int y); void mouseOver(); void mouseDown(); void mouseUp(); void hover(); void setValue(String value); void setFile(String value); void choose(String value); void choose(String value, boolean append); void choose(String[] values); void choose(String[] values, boolean append); String text(); String getText(); void rteWrite(String value); String rteText(); String rteHTML(); String fetch(); boolean exists(); boolean exists(boolean optimistic); String value(); String getValue(); String selectedText(); boolean isVisible(); boolean isVisible(boolean optimistic); String getSelectedText(); boolean containsText(String text); boolean containsHTML(String html); String style(String html); ElementStub in(ElementStub inEl); ElementStub under(ElementStub underEl); ElementStub near(ElementStub nearEl); ElementStub above(ElementStub aboveEl); ElementStub aboveOrUnder(ElementStub aboveOrUnderEl); ElementStub leftOf(ElementStub leftOfEl); ElementStub rightOf(ElementStub rightOfEl); ElementStub leftOrRightOf(ElementStub leftOrRightOfEl); String fetch(String string); boolean checked(); ElementStub parentNode(); ElementStub parentNode(String tagName); ElementStub parentNode(String tagName, int occurrence); List<ElementStub> collectSimilar(); int countSimilar(); void keyUp(int keyCode, int charCode); String getAttribute(String attribute); void blur(); void keyDown(int keyCode, int charCode); void keyPress(String keySequence, String combo); void highlight();  }### Answer:
@Test public void testToStringForSingleArg() { ElementStub stub = new ElementStub("textbox", browser, "abc"); assertEquals("_sahi._textbox(\"abc\")", stub.toString()); }
@Test public void testToStringForVariableArgs() { ElementStub stub = new ElementStub("textbox", browser, "abc", "def"); assertEquals("_sahi._textbox(\"abc\", \"def\")", stub.toString()); }
@Test public void testToStringForSingleNumberArg() { ElementStub stub = new ElementStub("textbox", browser, 1); assertEquals("_sahi._textbox(1)", stub.toString()); }
@Test public void testToStringForNumberArgs() { ElementStub stub = new ElementStub("textbox", browser, 1, 231); assertEquals("_sahi._textbox(1, 231)", stub.toString()); }
@Test public void testToStringForSingleElementStubArg() { ElementStub stub = new ElementStub("textbox", browser, new ElementStub("checkbox", browser, "checkme")); assertEquals("_sahi._textbox(_sahi._checkbox(\"checkme\"))", stub.toString()); }
@Test public void testToStringForElementStubArgs() { ElementStub stub = new ElementStub("textbox", browser, new ElementStub("checkbox", browser, "checkme"), new ElementStub("radio", browser, "r")); assertEquals("_sahi._textbox(_sahi._checkbox(\"checkme\"), _sahi._radio(\"r\"))", stub.toString()); }