Clean-up in the unit tests for NVP plugin

Simplify and reduce duplication in the unit test framework
for the NVP plugin.

Fixes bug 1204694

Change-Id: Ia96e1c2386ac013c24a2c7716d0e97ea6fdcf5d1
Merge "Clean-up in the unit tests for NVP plugin"