@@ -0,0 +1,968 @@
+package com.epam.rft.atsy.web.controllers;%0A%0Aimport org.mockito.InjectMocks;%0Aimport org.mockito.Mock;%0Aimport org.mockito.MockitoAnnotations;%0Aimport org.testng.annotations.BeforeMethod;%0Aimport org.testng.annotations.Test;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.equalToIgnoringCase;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.mockito.BDDMockito.given;%0A%0A/**%0A * Created by mates on 11/1/2015.%0A */%0Apublic class RestControllerTest %7B%0A%0A    @InjectMocks%0A    RestController restController;%0A%0A    @Mock%0A    RestController.Model model;%0A%0A    @BeforeMethod%0A    public void setUp() %7B%0A        MockitoAnnotations.initMocks(this);%0A    %7D%0A%0A    @Test%0A    public void getModelTest()%7B%0A        String attr1 = %22ssfsdfsf%22;%0A        given(model.getAttr1()).willReturn(attr1);%0A        RestController.Model model2 = restController.getModel();%0A%0A        assertThat(model.getAttr1(),is(equalToIgnoringCase(model2.getAttr1())) );%0A    %7D%0A%7D%0A

Test written for RestController