added test case for String preference