/** Test setting the caption. */ public void testSetCaption() { CaptionForTesting caption = new CaptionForTesting(); DialogBox dialogBox = new DialogBox(caption); caption.setText("text"); Element td = dialogBox.getCellElement(0, 1); assertEquals(dialogBox.getText(), "text"); caption.setHTML("<b>text</b>"); assertEquals("<b>text</b>", dialogBox.getHTML().toLowerCase()); dialogBox.show(); assertTrue(dialogBox.getCaption() == caption); assertTrue(caption.asWidget().getElement() == DOM.getChild(td, 0)); dialogBox.hide(); }