Added Validate method

Added tests to validate the configuration.