Remove duplicated code in test_versions

There is duplicated code in test_versions.
This patch removes it for cleanup.

Change-Id: Id8ff2147e624a89476a65c3f0ded54bdb26e53ad
Add v3 versions plugin unit test to v2

This patch adds v3 versions plugin unit test to v2 for improving
test coverage of v2 API.

Change-Id: I59dedcd31ea011d6eda7ff93d26b941334a67f51
Merge "Remove duplicated code in test_versions"
Merge "Add v3 versions plugin unit test to v2"