}
public void testConfig1()
throws Exception
{
final PolicyMetaData policy = buildFromResource( "config1.xml" );
assertEquals( "Policy KeyStore Count",
1,
policy.getKeyStores().length );
final KeyStoreMetaData keyStore = policy.getKeyStores()[ 0 ];
assertEquals( "KeyStore Name",
"myKeystore",
keyStore.getName() );
assertEquals( "KeyStore Location",
"sar:/conf/keystore",
keyStore.getLocation() );
assertEquals( "KeyStore Type",
"JKS",
keyStore.getType() );
assertEquals( "Policy Grant Count",
2,
policy.getGrants().length );
final GrantMetaData grant1 = policy.getGrants()[ 0 ];
final GrantMetaData grant2 = policy.getGrants()[ 1 ];
assertEquals( "grant1.getCodebase()",
"myCodeBase",
grant1.getCodebase() );
assertEquals( "grant1.getKeyStore()",