ReflectionTestUtils.setField(tagController, "timelineService", timelineService);
ReflectionTestUtils.setField(tagController, "tagMembershipService", tagMembershipService);
ReflectionTestUtils.setField(tagController, "userTagRepository", userTagRepository);
User authenticateUser = constructAUser(username + "@ippon.fr");
AuthenticationService mockAuthenticationService = mock(AuthenticationService.class);
when(mockAuthenticationService.getCurrentUser()).thenReturn(authenticateUser);
ReflectionTestUtils.setField(tagController, "authenticationService", mockAuthenticationService);
ReflectionTestUtils.setField(timelineService, "authenticationService", mockAuthenticationService);
ReflectionTestUtils.setField(statusUpdateService, "authenticationService", mockAuthenticationService);
ReflectionTestUtils.setField(tagMembershipService, "authenticationService", mockAuthenticationService);
this.mockMvc = MockMvcBuilders.standaloneSetup(tagController).build();