added tests for validation, moved test definitions to common file