### Question:
TokenSerializer { public abstract void saveAuthnFile(List<Callback> callbacks, String username, String authnPath, List<Callback> savedOnlyCallback, List<Class<? extends Callback>> readOnlyCallback) 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 testSaveAuthnFile() throws Exception { String username = "test"; String authnPath = "test.authfile"; List<Callback> callbacks = new LinkedList<Callback>(); Callback cb = new NameCallback("prompt"); ((NameCallback)cb).setName(username); callbacks.add(cb); final List<Class<? extends Callback>> readOnlyCallbacks; readOnlyCallbacks = new ArrayList<Class<? extends Callback>>(); readOnlyCallbacks.add(KerberosCallback.class); TokenSerializer.get().saveAuthnFile(callbacks, username, authnPath, null, readOnlyCallbacks); cleanAuthnFile(authnPath); }