@Test
public void testAuthWithoutId() throws Exception {

  Authentication auth = new UsernamePasswordAuthenticationToken("admin", null);
  SecurityContextHolder.getContext().setAuthentication(auth);
  Integer userId = AuthorizationHelper.getAuthenticatedId();
  Assert.assertEquals(Integer.valueOf(-1), userId);
}