Inline local variable.
Extracted app creation so that it is only done once for each required app.
Changed the last "un-exceptioned" function of the testpersistence to throw an exception. Added a stub for persistence where it was required.
Merge pull request #732 from NicoleRauch/master

Small cleanup