public void testTrailingZerosAreTrimmed() {
AnnotationDescriptor<Digits> descriptor = new AnnotationDescriptor<Digits>( Digits.class );
descriptor.setValue( "integer", 12 );
descriptor.setValue( "fraction", 3 );
descriptor.setValue( "message", "{validator.digits}" );
Digits p = AnnotationFactory.create( descriptor );
DigitsValidatorForNumber constraint = new DigitsValidatorForNumber();
constraint.initialize( p );
assertTrue( constraint.isValid( 0.001d, null ) );