cleaning
repository service use documentManager instead of connection
add DocumentInterface
use json in unit test
implement Repository and add tests