}
@Test
public void registerPassWithOneGoodKey() {
List<ActivationKey> keys = new ArrayList<ActivationKey>();
ActivationKey key1 = new ActivationKey("key1", owner);
ActivationKey key2 = new ActivationKey("key2", owner);
keys.add(key1);
keys.add(key2);
Product prod1 = TestUtil.createProduct();
Pool pool1 = TestUtil.createPool(owner, prod1, 5);
pool1.setId("pool1");
key1.addPool(pool1, 10L);
Product prod2 = TestUtil.createProduct();
Pool pool2 = TestUtil.createPool(owner, prod2, 5);
pool2.setId("pool2");
key1.addPool(pool2, 10L);
Product prod3 = TestUtil.createProduct();
Pool pool3 = TestUtil.createPool(owner, prod3, 5);
pool3.setId("pool3");
key2.addPool(pool3, 5L);
Consumer consumer = new Consumer("sys.example.com", null, null, system);
when(entitler.bindByPool(eq(pool1.getId()), eq(consumer), eq(10)))
.thenThrow(new ForbiddenException("fail"));
when(entitler.bindByPool(eq(pool2.getId()), eq(consumer), eq(10)))