assertEquals( "grant1.getPermissions().length",
1,
grant1.getPermissions().length );
final PermissionMetaData permission1 = grant1.getPermissions()[ 0 ];
assertEquals( "permission1.getClassname()",
"java.io.FilePermission",
permission1.getClassname() );
assertEquals( "permission1.getAction()",
"read,write",
permission1.getAction() );
assertEquals( "permission1.getTarget()",
"${/}tmp${/}*",
permission1.getTarget() );
assertEquals( "permission1.getKeyStore()",
"myKeystore",
permission1.getKeyStore() );
assertEquals( "permission1.getSignedBy()",
"Bob",
permission1.getSignedBy() );
assertEquals( "grant2.getCodebase()",
"sar:/SAR-INF/lib/*",
grant2.getCodebase() );
assertEquals( "grant2.getKeyStore()",
"myKeystore",
grant2.getKeyStore() );
assertEquals( "grant2.getSignedBy()",
"Bob",
grant2.getSignedBy() );
assertEquals( "grant2.getPermissions().length",
1,
grant2.getPermissions().length );
final PermissionMetaData permission2 = grant2.getPermissions()[ 0 ];
assertEquals( "permission2.getClassname()",
"java.io.FilePermission",
permission2.getClassname() );
assertEquals( "permission2.getAction()",
null,
permission2.getAction() );
assertEquals( "permission2.getTarget()",
null,
permission2.getTarget() );
assertEquals( "permission2.getKeyStore()",
null,
permission2.getKeyStore() );
assertEquals( "permission2.getSignedBy()",
null,
permission2.getSignedBy() );
}