added tests and function to retrieve configuration from config.xml