add unit tests on document helper