Added error message and tests for MaxRetention