### Question:
TokenSerializer { public abstract byte[] readToken() throws IOException;  static synchronized TokenSerializer get(); abstract void saveToken(byte[] token); abstract byte[] readToken(); abstract void saveAuthnFile(List<Callback> callbacks, String username,
      String authnPath, List<Callback> savedOnlyCallback,
      List<Class<? extends Callback>> readOnlyCallback); abstract List<Callback> getCallbacks(HASClient 
      hasClient, String principal, String authnFilePath); abstract void cleanIdentityTokenFile();  }### Answer:
@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(); }