oauth and unit tests