Refactor some of the test setup code to reduce repetition.
Refactor some of the test setup code to reduce repetition.

hackday-profilers/flocker,agonzalezro/flocker,mbrukman/flocker,AndyHuu/flocker,moypray/flocker,LaynePeng/flocker,wallnerryan/flocker-profiles,agonzalezro/flocker,Azulinho/flocker,moypray/flocker,mbrukman/flocker,jml/flocker,adamtheturtle/flocker,adamtheturtle/flocker,w4ngyi/flocker,agonzalezro/flocker,achanda/flocker,achanda/flocker,runcom/flocker,jml/flocker,jml/flocker,Azulinho/flocker,lukemarsden/flocker,hackday-profilers/flocker,AndyHuu/flocker,wallnerryan/flocker-profiles,AndyHuu/flocker,LaynePeng/flocker,hackday-profilers/flocker,moypray/flocker,w4ngyi/flocker,1d4Nf6/flocker,runcom/flocker,1d4Nf6/flocker,w4ngyi/flocker,runcom/flocker,lukemarsden/flocker,1d4Nf6/flocker,LaynePeng/flocker,adamtheturtle/flocker,wallnerryan/flocker-profiles,lukemarsden/flocker,Azulinho/flocker,mbrukman/flocker,achanda/flocker