@Test public void test_toString() { Prompt prompt = new Prompt(evaluator, id); when(evaluator.isVisible(any(Component.class))).thenReturn(true); when(evaluator.isEnabled(any(Component.class))).thenReturn(true); when(evaluator.title(prompt)).thenReturn("title"); when(evaluator.message(prompt)).thenReturn("message"); assertThat(prompt.toString(), is("class org.testatoo.core.component.Prompt with state : enabled:true, visible:true, title:title, message:message")); } }