Fixed a failing test in the doc
Added tests