added unit tests for couchdb admin
use contracts based programming
setup integration tests for the controller