test fixes,refactorings
slow to nightly tests
Merge pull request #2060 from mesutcelik/test-refactorings

Test refactorings