@SpecAssertion(section = "4.3.1", id = "e"),
@SpecAssertion(section = "4.3.1.1", id = "a")
})
public void testSuccessfullInterpolationOfValidationMessagesValue() {
MessageInterpolator interpolator = getDefaultMessageInterpolator();
ConstraintDescriptor<?> descriptor = getDescriptorFor( DummyEntity.class, "foo" );
MessageInterpolator.Context context = new TestContext( descriptor );
String expected = "replacement worked";
String actual = interpolator.interpolate( "{foo}", context );
assertEquals( actual, expected, "Wrong substitution" );
expected = "replacement worked replacement worked";
actual = interpolator.interpolate( "{foo} {foo}", context );
assertEquals( actual, expected, "Wrong substitution" );
expected = "This replacement worked just fine";
actual = interpolator.interpolate( "This {foo} just fine", context );
assertEquals( actual, expected, "Wrong substitution" );
expected = "{} replacement worked {unkown}";
actual = interpolator.interpolate( "{} {foo} {unkown}", context );
assertEquals( actual, expected, "Wrong substitution" );
}