Added new tests for PullRequests

Added new tests
Fixed bugs
Improved infrastructure.