assertEquals(expectedView, view);
}
@Test
public void search() {
SearchDTO searchCriteria = createSearchDTO();
List<Person> expected = new ArrayList<Person>();
when(personServiceMock.search(searchCriteria.getSearchTerm())).thenReturn(expected);
BindingAwareModelMap model = new BindingAwareModelMap();
String view = controller.search(searchCriteria, model);
verify(personServiceMock, times(1)).search(searchCriteria.getSearchTerm());
verifyNoMoreInteractions(personServiceMock);
assertEquals(PersonController.PERSON_SEARCH_RESULT_VIEW, view);
List<Person> actual = (List<Person>) model.asMap().get(PersonController.MODEL_ATTRIBUTE_PERSONS);
assertEquals(expected, actual);