### Question:
HelloWorldComposite { void handleAddButtonClick() { if (!titleTextBox.isEmpty() && !descriptionTextArea.isEmpty()) { TodoItem todoItem = new TodoItem(titleTextBox.getValue(), descriptionTextArea.getValue()); todoItemsListGroup.addItem(todoItem); titleTextBox.setValue(""); descriptionTextArea.setValue(""); } } @Inject  HelloWorldComposite(TextBox titleTextBox, TextArea descriptionTextArea,
                          @Named("todoItemsListGroup") ListGroup<TodoItem> todoItemsListGroup,
                          @Named("doneItemsListGroup") ListGroup<TodoItem> doneItemsListGroup,
                          TodoItemRenderer toDoItemRenderer,
                          Button addButton, Layout layout);   }### Answer:
@Test public void testHandleAddButtonClickTitleAndDescriptionNotEmpty() throws Exception { doReturn("Title").when(titleTextBox).getValue(); doReturn("Description").when(descriptionTextArea).getValue(); helloWorldComposite.handleAddButtonClick(); verify(todoItemsListGroup, times(1)).addItem(Matchers.<TodoItem>any()); verify(titleTextBox, times(1)).setValue(""); verify(descriptionTextArea, times(1)).setValue(""); }