public void testGetInstance() throws Exception {
  try {
    ExemptionMechanism.getInstance((String)null,"aaa");
    fail("NoSuchProviderException must be thrown");
  }
 catch (  NoSuchProviderException pe) {
  }
  try {
    ExemptionMechanism.getInstance("AlgName",(String)null);
    fail("IllegalArgumentException expected");
  }
 catch (  IllegalArgumentException e) {
  }
}

public void testGetInstance ( ) throws Exception { try { ExemptionMechanism . getInstance ( ( String ) null , "aaa" ) ; fail ( "NoSuchProviderException must be thrown" ) ; } catch ( NoSuchProviderException pe ) { } try { ExemptionMechanism . getInstance ( "AlgName" , ( String ) null ) ; fail ( "IllegalArgumentException expected" ) ; } catch ( IllegalArgumentException e ) { } }
javax / crypto / exemptionmechanism # getinstance ( string algorithm , string provider ) checks exception order
