@@ -0,0 +1,1865 @@
+package ru.job4j.hiber.controllers;%0A%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport ru.job4j.hiber.persistence.Database;%0Aimport ru.job4j.hiber.persistence.ItemDao;%0A%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.ServletOutputStream;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport java.io.IOException;%0A%0Aimport static org.mockito.Mockito.*;%0A%0Apublic class ControllersTest %7B%0A    private HttpServletResponse resp = mock(HttpServletResponse.class);%0A    private HttpServletRequest req = mock(HttpServletRequest.class);%0A    private ServletOutputStream out = mock(ServletOutputStream.class);%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        when(resp.getOutputStream()).thenReturn(out);%0A    %7D%0A%0A    @Test%0A    public void whenCalledViewThenItShouldTakeRequestParameterShow() throws ServletException, IOException %7B%0A        when(req.getParameter(%22show%22)).thenReturn(%22true%22);%0A        new ViewController().doGet(req, resp);%0A        verify(resp, atLeastOnce()).getOutputStream();%0A        verify(req, atLeastOnce()).getParameter(%22show%22);%0A    %7D%0A%0A    @Test%0A    public void whenCreateCalledThenShouldTakeRequestParameterDescription() throws ServletException, IOException %7B%0A        when(req.getParameter(%22show%22)).thenReturn(%22Servlet test description%22);%0A        new CreateController().doPost(req, resp);%0A        verify(req, atLeastOnce()).getParameter(%22description%22);%0A    %7D%0A%0A    @Test%0A    public void whenCalledEditThenItShouldTakeTwoRequestParameters() throws ServletException, IOException %7B%0A        when(req.getParameter(%22id%22)).thenReturn(%221%22);%0A        when(req.getParameter(%22done%22)).thenReturn(%22true%22);%0A        new EditController().doPost(req, resp);%0A        verify(req, atLeastOnce()).getParameter(%22id%22);%0A        verify(req, atLeastOnce()).getParameter(%22done%22);%0A    %7D%0A%7D

create test for servlet classes