Bug 550617 - [tests] Add helper method for preference changes

If a unit test need to change a preference a common pattern is to get
the current value, set the value for test and then ensure to reset the
old value after the test finished to not influence other tests. The
helper simplify this task.

Change-Id: Ifeb1731b9f44bfcb85cb61cae17da22116803dfb
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
3 files changed