Added test and documentation.