ActivationKeyRules { @Inject public ActivationKeyRules(I18n i18n) { this.i18n = i18n; } @Inject  ActivationKeyRules(I18n i18n); ValidationResult runPoolValidationForActivationKey(ActivationKey key, Pool pool, Long quantity); String validatePoolForActivationKey(ActivationKey key, Pool pool, Long quantity);  }
@Test public void testActivationKeyRules() { ActivationKey key = new ActivationKey(); key.addPool(genPool(), new Long(1)); key.addPool(genPool(), new Long(1)); Pool pool = genPool(); ValidationResult result = actKeyRules.runPoolValidationForActivationKey(key, pool, new Long(1)); assertTrue(result.getErrorKeys().isEmpty()); }