Added some unit tests for document builder impl