refactor EndPointQuantityValidator &&  EndPointQuantityValidatorTest