Integration Testing

refactored db transactions to allow IOC
that would make easier unit testing

Change-Id: Ifbaa14e8b8025c3a68b4eddd794c92f389087a94
Implements: blueprint openid-oauth2-integration-testing