assertAndReturnModelAttributeOfType(mav, "privateMessageDto", PrivateMessageDto.class);
}
@Test
public void showPmPageInbox() throws NotFoundException {
PrivateMessage pm = getPrivateMessage();
//set expectations
when(pmService.get(PM_ID)).thenReturn(pm);
//invoke the object under test
ModelAndView mav = controller.showPmPage(PM_ID);
//check expectations
verify(pmService).get(PM_ID);
//check result
assertViewName(mav, "pm/showPm");
PrivateMessage actualPm = assertAndReturnModelAttributeOfType(mav, "pm", PrivateMessage.class);
assertEquals(actualPm, pm);
}