package com.braintreepayments.api;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

import android.content.Context;

import org.junit.Before;
import org.junit.Test;

public class VenmoSharedPrefsWriterUnitTest {

    private Context context;
    private BraintreeSharedPreferences braintreeSharedPreferences;

    @Before
    public void beforeEach() {
        context = mock(Context.class);
        braintreeSharedPreferences = mock(BraintreeSharedPreferences.class);
    }

    @Test
    public void persistVenmoVaultOption_persistsVaultOption() throws UnexpectedException {
        VenmoSharedPrefsWriter sut = new VenmoSharedPrefsWriter(braintreeSharedPreferences);
        sut.persistVenmoVaultOption(context, true);
        verify(braintreeSharedPreferences).putBoolean("com.braintreepayments.api.Venmo.VAULT_VENMO_KEY", true);
    }

    @Test
    public void getVenmoVaultOption_retrievesVaultOptionFromSharedPrefs() throws UnexpectedException {
        VenmoSharedPrefsWriter sut = new VenmoSharedPrefsWriter(braintreeSharedPreferences);
        sut.getVenmoVaultOption(context);
        verify(braintreeSharedPreferences).getBoolean("com.braintreepayments.api.Venmo.VAULT_VENMO_KEY");
    }
}
@@ -116,41 +116,8 @@
 y;%0A%0A
-import android.content.Context;%0A%0A
 impo
@@ -137,16 +137,16 @@
 Before;%0A
+
 import o
@@ -212,37 +212,8 @@
  %7B%0A%0A
-    private Context context;%0A
     
@@ -323,47 +323,8 @@
 ) %7B%0A
-        context = mock(Context.class);%0A
     
@@ -572,34 +572,8 @@
 ter(
-braintreeSharedPreferences
 );%0A 
@@ -607,23 +607,42 @@
 tOption(
-context
+braintreeSharedPreferences
 , true);
@@ -942,34 +942,8 @@
 ter(
-braintreeSharedPreferences
 );%0A 
@@ -977,15 +977,34 @@
 ion(
-context
+braintreeSharedPreferences
 );%0A 

Update VenmoSharedPrefs unit test.