private User isden; // Заблокированный пользователь
private LorCodeService lorCodeService;
@Before
public void initTest() throws Exception {
UserDao userDao = mock(UserDao.class);
User splinter = mock(User.class);
maxcom = mock(User.class);
JB = mock(User.class);
isden = mock(User.class);
when(maxcom.isBlocked()).thenReturn(false);
when(JB.isBlocked()).thenReturn(false);
when(isden.isBlocked()).thenReturn(true);
when(maxcom.getNick()).thenReturn("maxcom");
when(JB.getNick()).thenReturn("JB");
when(isden.getNick()).thenReturn("isden");
when(splinter.isBlocked()).thenReturn(false);
when(splinter.getNick()).thenReturn("splinter");
when(userDao.getUser("splinter")).thenReturn(splinter);
when(userDao.getUser("maxcom")).thenReturn(maxcom);
when(userDao.getUser("JB")).thenReturn(JB);
when(userDao.getUser("isden")).thenReturn(isden);
when(userDao.getUser("hizel")).thenThrow(new UserNotFoundException("hizel"));
String mainUrl = "http://127.0.0.1:8080/";
URI mainURI = new URI(mainUrl, true, "UTF-8");
SiteConfig siteConfig = mock(SiteConfig.class);