Fix for a slightly unreliable unit test as well as reduced unit test code duplication.
Merge remote branch 'origin' into gradle_changes
Merge remote branch 'origin/gradle_changes' into gradle_changes