/** * @see Component */ @Override public String toString() { return super.toString() + ", text:" + text() + ", icon:" + icon(); } }
@Test public void test_button_icon() { Button button = new Button(evaluator, id); when(evaluator.icon(button)).thenReturn("http://localhost/enter.gif"); assertThat(button.icon(), is("http://localhost/enter.gif")); }