@Test
public void testSettings_StatisticFilter_ON_Average() {

    String prefFilterKey = resources.getString(R.string.key_pref_filteringEnabled);
    sharedPreferences.edit().putBoolean(prefFilterKey, true).commit();
    // Set the algorithm to plasmona
    String filterListKey = resources.getString(R.string.key_pref_filterAlgorithmList);
    String averageKey = resources.getString(R.string.filterAlgorithmAverage);
    sharedPreferences.edit().putString(filterListKey, averageKey).commit();
    activity.onResume();
    verify(userLocator, times(1)).setStatisticFilterMode(eq(UserLocator.STATISTIC_FILTER_MODE_AVERAGE));
    verify(userLocator, never()).setStatisticFilterMode(eq(UserLocator.STATISTIC_FILTER_MODE_MEDIAN));
    verify(userLocator, never()).setStatisticFilterMode(eq(UserLocator.STATISTIC_FILTER_MODE_NO_FILTER));
}