Hi Guys,
I am writting unit tests for various bean property constraints. For most of the constraints such is field length , format of the field and whether a field is null or not, i am able to test using the JSR303 validation API. My question is, how do i write a unit test for this constraint: 'The field username of entity User must be unique' . I am a java developer so would appreciate a java based solution though any answer is much welcome.
Kind regards.