}
public void testFailureRetrievingCertForAlias()
throws Exception
{
final PolicyBuilder builder = new TestNoInitPolicyBuilder();
final PermissionMetaData permission =
new PermissionMetaData( AllPermission.class.getName() + "sss", null, null,
null, null );
final GrantMetaData grant =
new GrantMetaData( "file:/", "peter", "default",
new PermissionMetaData[]{permission} );
final KeyStoreMetaData keyStore =
new KeyStoreMetaData( "default", "http://spice.sourceforge.net", "DoDgY" );
final PolicyMetaData metaData =
new PolicyMetaData( new KeyStoreMetaData[]{keyStore}, new GrantMetaData[]{grant} );
final TestResolver resolver = new TestResolver();
try
{
builder.buildPolicy( metaData, resolver );
fail( "Expected to fail when creating policy as unable to create store" );
}
catch( Exception e )
{
}