[#1625] Add documentation and tests