@@ -0,0 +1,1454 @@
+package se.kth.csc.controller;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.springframework.security.core.context.SecurityContextHolder;%0A%0Aimport se.kth.csc.model.Account;%0Aimport se.kth.csc.persist.AccountStore;%0A%0Aimport java.security.Principal;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.mockito.Mockito.atLeastOnce;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.when;%0A%0Apublic class HomeControllerTest %7B%0A%0A  // System under test (SUT):%0A  private HomeController homeController;%0A%0A  // Dependencies of this unit%0A  private AccountStore accountStore;%0A%0A  @Before%0A  public void setUp() throws Exception %7B%0A    // Mock dependencies%0A    accountStore = mock(AccountStore.class);%0A%0A    // Create SUT%0A    homeController = new HomeController(accountStore);%0A  %7D%0A%0A  @Test%0A  public void testMakeMeAdmin() %7B%0A    // Set up expected behavior of mocks%0A    Principal principal = mock(Principal.class);%0A    when(principal.getName()).thenReturn(%22testuser%22);%0A%0A    Account account = mock(Account.class);%0A    when(accountStore.fetchAccountWithPrincipalName(%22testuser%22)).thenReturn(account);%0A%0A    // Run the system under test%0A    String result = homeController.makeMeAdmin(principal);%0A%0A    // Verify that interactions with mocks happened%0A    verify(account, atLeastOnce()).setAdmin(true);%0A%0A    // Verify actual returned results%0A    assertEquals(%22redirect:/debug%22, result);%0A  %7D%0A%7D%0A

Add example test to show how it's done