Replace document.implementation tests

Replace document.implementation tests by a more accurate test.