added validations to Book model and also test for the same