List<ValidatorInfo> validatorsForRole = handler.getValidatorsForRole(roles);
assertNotNull(validatorsForRole);
for(ValidatorInfo validatorForRole : validatorsForRole){
assertEquals("Should get validator for role", role, validatorForRole.getRoles().get(0));
}
<BUG>verify(configService, times(2)).subscribeTo(eq("api-validator"),eq(instance.getWadlPath(wadl)), any(ApiValidatorHandlerFactory.ApiValidatorWadlListener.class), any(GenericResourceConfigurationParser.class));
}</BUG>
@Test
public void shouldSetDefaultValidator() {
ApiValidatorHandler handler = instance.buildHandler();

List<ValidatorInfo> validatorsForRole = handler.getValidatorsForRole(roles);
assertNotNull(validatorsForRole);
for(ValidatorInfo validatorForRole : validatorsForRole){
assertEquals("Should get validator for role", role, validatorForRole.getRoles().get(0));
}
verify(configService, times(2)).subscribeTo(eq("api-validator"),eq(instance.getWadlPath(wadl)),
any(ApiValidatorHandlerFactory.ApiValidatorWadlListener.class),
any(GenericResourceConfigurationParser.class));
}
@Test
public void shouldSetDefaultValidator() {
ApiValidatorHandler handler = instance.buildHandler();
