unit testing and validation