Refactor integration tests
Many methods in integration tests were created ad-hoc to solve a
problem, without checking that methods performing similar functions
already exist and can be reused.
This patch factors out some of those methods to a separate utility
class, and migrates existing users to those methods. They are also
sorted according to functionality within the new file, and documented
with JavaDoc, so it's easier to figure what they offer.
This refactoring is not exhaustive, and may be continued in follow-up
patches.
Change-Id: I14d2a0abaa9d1cb59ff241eecd7e184165701ea6
Signed-off-by: Lorand Jakab <lojakab@cisco.com>