@@ -0,0 +1,1494 @@
+package com.cocosw.favor;%0A%0Aimport android.content.SharedPreferences;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mockito;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A/**%0A * @author Mohd Farid mohd.farid@devfactory.com%0A */%0Apublic class StringTasteTest %7B%0A%0A    private SharedPreferences sharedPreferences;%0A%0A    private final String%5B%5D defaultValues = %7B%22default-value-first%22, %22default-value-second%22%7D;%0A%0A    private SharedPreferences.Editor editor;%0A%0A    @Before%0A    public void setup()%7B%0A        sharedPreferences = Mockito.mock(SharedPreferences.class);%0A        Mockito.when(sharedPreferences.getString(%22key%22, %22default-value-first%22)).thenReturn(%22return-val-for-key-and-valueString%22);%0A        editor = Mockito.mock(SharedPreferences.Editor.class);%0A    %7D%0A%0A    @Test%0A    public void testGet() throws Exception %7B%0A        //given%0A        Taste.StringTaste stringTaste = new Taste.StringTaste(sharedPreferences, %22key%22, defaultValues);%0A%0A        //when%0A        Object getResult = stringTaste.get();%0A%0A        //then%0A        assertEquals(%22return-val-for-key-and-valueString%22, getResult);%0A    %7D%0A%0A    @Test%0A    public void testEditor() throws Exception %7B%0A        //given%0A        Mockito.when(sharedPreferences.edit()).thenReturn(editor);%0A        Taste.StringTaste stringTaste = new Taste.StringTaste(sharedPreferences, %22key%22, defaultValues);%0A%0A        //when%0A        stringTaste.editor(%22some-value%22);%0A%0A        //then%0A        Mockito.verify(editor).putString(%22key%22, %22some-value%22);%0A    %7D%0A%7D

Add unit tests for StringTasteTest class