    @Test
    public void configurationAuthentication_ShouldSetAuthenticationToSecurityContext() {

        AuthenticationUtil.configureAuthentication(ROLE);

        Authentication currentAuthentication = SecurityContextHolder.getContext().getAuthentication();
        assertThat(currentAuthentication.getAuthorities()).hasSize(1);
        assertThat(currentAuthentication.getAuthorities().iterator().next().getAuthority()).isEqualTo(ROLE);

        User principal = (User) currentAuthentication.getPrincipal();
        assertThat(principal.getAuthorities()).hasSize(1);
        assertThat(principal.getAuthorities().iterator().next().getAuthority()).isEqualTo(ROLE);
    }