public function testResourcePermissions()
 {
     $context = new Context();
     $identity = new Identity('AWS', 'xrn:aws:iam::AWS-account-ID:user/bob');
     $resource = new Resource('xrn:aws:s3:eu-west-1:12345:some-bucket');
     $loader = new JsonPolicyLoader();
     $policy = $loader->load(__DIR__ . '/resource-policy1.json');
     $context->addResourcePolicy($resource, $policy);
     $action = new Action('s3', 'ListBucket');
     $this->assertTrue($context->isAllowed($identity, $resource, $action));
 }