question: 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 ) { } }
target:  javax/crypto/ExemptionMechanism#getInstance(String algorithm, String provider) Checks exception order