Optional parameter for testing, supply optional parameters

for safety, update _displayError for testing
Add new test