@Test
public void testGetCurrentLogin() {

    SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
    securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin"));
    SecurityContextHolder.setContext(securityContext);
    String login = SecurityUtils.getCurrentLogin();
    assertThat(login).isEqualTo("admin");
}