verifyZeroInteractions(messageSourceMock);
}
@Test
public void showUpdateTodoForm() throws TodoNotFoundException {
BindingAwareModelMap model = new BindingAwareModelMap();
Todo updated = TodoTestUtil.createModel(TodoTestUtil.ID, TodoTestUtil.DESCRIPTION, TodoTestUtil.TITLE);
when(serviceMock.findById(TodoTestUtil.ID)).thenReturn(updated);
String view = controller.showUpdateTodoForm(TodoTestUtil.ID, model);
verify(serviceMock, times(1)).findById(TodoTestUtil.ID);
verifyNoMoreInteractions(serviceMock);
verifyZeroInteractions(messageSourceMock);
assertEquals(TodoController.VIEW_TODO_UPDATE, view);
TodoDTO formObject = (TodoDTO) model.asMap().get(TodoController.MODEL_ATTRIBUTE_TODO);
assertEquals(updated.getId(), formObject.getId());
assertEquals(updated.getDescription(), formObject.getDescription());
assertEquals(updated.getTitle(), formObject.getTitle());
}