StaticSecurityService implements SecurityService { @Override public Authentication getAuthentication(String token) { return authenticationTokenService.getAuthentication(token); }  @Override String getId(); @Override Authentication getAuthentication(String token); static final String SECURITY_SERVICE_ID; }
@Test public void testService() throws Exception { Authentication auth = new Authentication(); String token = tokenService.login(auth); Authentication res = staticSecurityService.getAuthentication(token); Assert.assertEquals(auth, res); tokenService.logout(token); res = staticSecurityService.getAuthentication(token); Assert.assertNull(res); }