p1.setAttribute("requires_host", "host1");
Pool p2 = genPool();
p2.setAttribute("requires_host", "");
when(akc.verifyAndLookupKey(eq("testKey"))).thenReturn(ak);
when(poolManager.find(eq("testPool1"))).thenReturn(p1);
when(poolManager.find(eq("testPool2"))).thenReturn(p2);
ActivationKeyResource akr = new ActivationKeyResource(
akc, i18n, poolManager, serviceLevelValidator, activationKeyRules, null);
akr.addPoolToKey("testKey", "testPool1", 1L);