InlineNotification implements IsElement { public void setMessage(final String message) { this.message.setTextContent(message); }  @Override HTMLElement getElement(); void setMessage(final String message); void setMessage(final List<String> messages); void setDismissable(); void setType(final InlineNotificationType type);  }
@Test public void testMessage() { final String msg = "message"; notification.setMessage(msg); verify(message).setTextContent(msg); }
@Test public void testMessages() { final HTMLElement htmlElement = mock(HTMLElement.class); when(htmlElement.getClassList()).thenReturn(mock(DOMTokenList.class)); when(document.createElement(anyString())).thenReturn(htmlElement); when(message.getChildNodes()).thenReturn(mock(NodeList.class)); notification.setMessage(Arrays.asList("message")); verify(message).appendChild(any(Node.class)); verify(document).createElement("li"); verify(document).createElement("ul"); }