Added tests for generic validator