@Test
public void testReadToken() throws Exception {

  Token identityToken = createToken(null, IdentityToken.class.getName());
  byte[] tokenBytes = TokenUtils.getBytesOfToken(identityToken);
  System.out.println(tokenBytes.length);
  TokenSerializer.get().saveToken(tokenBytes);
  
  Token readToken = TokenFactory.get().createIdentityToken(TokenSerializer.get().readToken());
  System.out.println(readToken.getPrincipal().getName());
  assertEquals(readToken.getPrincipal().getName(), DEFAULT_PRINCIAL_NAME);
  
  TokenSerializer.get().cleanIdentityTokenFile();
  
}