@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);
}