@Test
public void testSettings_MapMatching_ON_OFF() {

    String prefMapMatchingToggle = resources.getString(R.string.key_pref_mapMatching_toggle);
    sharedPreferences.edit().putBoolean(prefMapMatchingToggle, true).commit();
    activity.onResume();
    verify(userLocator, times(1)).setMapMatchingMode(eq(UserLocator.MAP_MATCHING_MODE_SIMPLE_WAY_SNAP));
    verify(userLocator, never()).setMapMatchingMode(eq(UserLocator.MAP_MATCHING_MODE_NONE));
    sharedPreferences.edit().putBoolean(prefMapMatchingToggle, false).commit();
    activity.onResume();
    verify(userLocator, times(1)).setMapMatchingMode(eq(UserLocator.MAP_MATCHING_MODE_NONE));
}