/*
package uk.ac.ebi.spot.goci.curation.controller;


import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import uk.ac.ebi.spot.goci.CurationApplication;

import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.redirectedUrl;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

*/
/**
 * Created by emma on 14/10/2015.
 *
 * @author emma
 *         <p>
 *         Unit test for HomeController based on http://spring.io/guides/gs/spring-boot/
 *//*

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = CurationApplication.class)
@WebAppConfiguration
public class HomeControllerTest {

    @Autowired
    private HomeController homeController;

    private MockMvc mvc;

    @Before
    public void setUp() throws Exception {
        mvc = MockMvcBuilders.standaloneSetup(homeController).build();
    }

    @Test
    public void getHome() throws Exception {
        mvc.perform(MockMvcRequestBuilders.get("/").accept(MediaType.TEXT_HTML_VALUE))
                .andExpect(status().is3xxRedirection())
                .andExpect(redirectedUrl("/login"));
    }
}

*/

@@ -1,11 +1,8 @@
-/*%0A
 package 
@@ -43,17 +43,16 @@
 oller;%0A%0A
-%0A
 import o
@@ -139,307 +139,85 @@
 org.
-springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.SpringApplicationConfiguration;%0Aimport org.springframework.http.MediaType;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0Aimport org.springframework.test.context.web.WebAppConfiguration
+mockito.runners.MockitoJUnitRunner;%0Aimport org.springframework.http.MediaType
 ;%0Aim
@@ -315,23 +315,21 @@
 let.
-request
+setup
 .MockMvc
 Requ
@@ -320,31 +320,24 @@
 etup.MockMvc
-Request
 Builders;%0Aim
@@ -334,23 +334,31 @@
 ilders;%0A
+%0A
 import 
+static 
 org.spri
@@ -382,37 +382,39 @@
 web.servlet.
-setup
+request
 .MockMvc
 Builders;%0Aim
@@ -401,24 +401,31 @@
 .MockMvc
+Request
 Builders
 ;%0Aimport
@@ -420,58 +420,13 @@
 ders
-;%0Aimport uk.ac.ebi.spot.goci.CurationApplication;%0A
+.get;
 %0Aimp
@@ -606,19 +606,16 @@
 tatus;%0A%0A
-*/%0A
 /**%0A * C
@@ -774,11 +774,8 @@
 %0A */
-/*%0A
 %0A@Ru
@@ -784,128 +784,33 @@
 ith(
-SpringJUnit4ClassRunner.class)%0A@SpringApplicationConfiguration(classes = CurationApplication.class)%0A@WebAppConfiguration
+MockitoJUnitRunner.class)
 %0Apub
@@ -845,23 +845,8 @@
  %7B%0A%0A
-    @Autowired%0A
     
@@ -906,16 +906,20 @@
 ockMvc m
+ockM
 vc;%0A%0A   
@@ -978,17 +978,68 @@
         
-m
+homeController = new HomeController();%0A        mockM
 vc = Moc
@@ -1163,16 +1163,20 @@
        m
+ockM
 vc.perfo
@@ -1178,39 +1178,16 @@
 perform(
-MockMvcRequestBuilders.
 get(%22/%22)
@@ -1342,9 +1342,4 @@
  %7D%0A%7D
-%0A%0A*/%0A

Update test to use mockito runner