Initial refactor the the test suite according with the new design.
Merge remote-tracking branch 'upstream/master'