class LocalCognitoTokenStore {

    public void persist(@Nullable Cognito cognito) {
        final SharedPreferences.Editor editor = sharedPreferences.get().edit();
        editor.putString(KEY_COGNITO_TOKEN, cognito != null ? cognito.getCognitoToken() : null);
        editor.putString(KEY_COGNITO_IDENTITY_ID, cognito != null ? cognito.getIdentityId() : null);
        editor.putLong(KEY_COGNITO_TOKEN_EXPIRATION, cognito != null ? cognito.getCognitoTokenExpiresAt().getTime() : -1);
        editor.apply();
    }

    @Inject public  LocalCognitoTokenStore(@NonNull Lazy<SharedPreferences> sharedPreferences);

}