@@ -0,0 +1,1998 @@
+package com.episode6.hackit.typed.preferences;%0A%0Aimport android.content.Context;%0Aimport com.episode6.hackit.mockspresso.Mockspresso;%0Aimport com.episode6.hackit.typed.core.util.Supplier;%0Aimport com.episode6.hackit.typed.testing.Rules;%0Aimport com.google.gson.Gson;%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.mockito.Mock;%0A%0Aimport static org.fest.assertions.api.Assertions.assertThat;%0Aimport static org.mockito.ArgumentMatchers.anyInt;%0Aimport static org.mockito.ArgumentMatchers.anyString;%0Aimport static org.mockito.Mockito.when;%0A%0A/**%0A * Tests %7B@link TypedPrefs.wrap%7D%0A */%0Apublic class TypedPrefsWrapTest %7B%0A%0A  final SharedTestResources t = new SharedTestResources();%0A  @Rule public final Mockspresso.Rule mockspresso = Rules.mockspressoBuilder()%0A      .testResources(t)%0A      .buildRule();%0A%0A  private static final PrefKey%3CInteger%3E INT_PREF = PrefNamespace.ROOT.key(Integer.class)%0A      .named(%22testInt%22)%0A      .buildWithDefault(3);%0A  private static final OptPrefKey%3CTestClass%3E CLASS_PREF = PrefNamespace.ROOT%0A      .key(TestClass.class)%0A      .named(%22simpleNullTestPref%22)%0A      .buildOptional();%0A%0A  @Mock Context mContext;%0A  @Mock Supplier%3CGson%3E mGsonSupplier;%0A%0A  @Before%0A  public void setup() %7B%0A    when(mContext.getSharedPreferences(anyString(), anyInt())).thenReturn(t.mSharedPreferences);%0A    when(mGsonSupplier.get()).thenReturn(t.mGson);%0A  %7D%0A%0A  @Test%0A  public void testSimpleWrap() %7B%0A    TypedPrefs prefs = TypedPrefs.wrap.sharedPrefs(t.mSharedPreferences);%0A    int value = prefs.get(INT_PREF);%0A%0A    t.verifyPrefDidntExist(INT_PREF);%0A    assertThat(value).isEqualTo(3);%0A  %7D%0A%0A  @Test%0A  public void testWrapWithGson() %7B%0A    TestClass expected = new TestClass();%0A    t.setupPrefExists(CLASS_PREF, expected);%0A%0A    TypedPrefs prefs = TypedPrefs.wrap.sharedPrefs(t.mSharedPreferences, mGsonSupplier);%0A    TestClass result = prefs.get(CLASS_PREF);%0A%0A    t.verifyPrefExisted(CLASS_PREF);%0A    assertThat(result).isEqualTo(expected);%0A  %7D%0A%0A  static class TestClass %7B%7D%0A%7D%0A

add a basic test for TypedPrefs.wrap