public void test_doAsPrivileged_01(){
  Subject subj=new Subject();
  PrivilegedAction<Object> pa=new myPrivilegedAction();
  PrivilegedAction<Object> paNull=null;
  AccessControlContext acc=AccessController.getContext();
  try {
    Object obj=Subject.doAsPrivileged(null,pa,acc);
  }
 catch (  Exception e) {
    fail("Unexpected exception: " + e);
  }
  try {
    Object obj=Subject.doAsPrivileged(subj,pa,acc);
  }
 catch (  Exception e) {
    fail("Unexpected exception: " + e);
  }
  try {
    Object obj=Subject.doAsPrivileged(subj,paNull,acc);
    fail("NullPointerException wasn't thrown");
  }
 catch (  NullPointerException npe) {
  }
}

public void test_doAsPrivileged_01 ( ) { Subject subj = new Subject ( ) ; PrivilegedAction < Object > pa = new myPrivilegedAction ( ) ; PrivilegedAction < Object > paNull = null ; AccessControlContext acc = AccessController . getContext ( ) ; try { Object obj = Subject . doAsPrivileged ( null , pa , acc ) ; } catch ( Exception e ) { fail ( "Unexpected exception: " + e ) ; } try { Object obj = Subject . doAsPrivileged ( subj , pa , acc ) ; } catch ( Exception e ) { fail ( "Unexpected exception: " + e ) ; } try { Object obj = Subject . doAsPrivileged ( subj , paNull , acc ) ; fail ( "NullPointerException wasn't thrown" ) ; } catch ( NullPointerException npe ) { } }
javax . security . auth . subject # doasprivileged ( subject subject , privilegedaction action , accesscontrolcontext acc )
