@Test public void getSoundWithOldKey() { String sound = "sound"; Intent pushIntent = mock(Intent.class); mockPutExtra(pushIntent, PushIntentUtils.EXTRA_SOUND, "this is not the sound you are looking for"); mockPutExtra(pushIntent, PushIntentUtils.EXTRA_SOUND_ALT, sound); String retrievedSound = PushIntentUtils.getSound(pushIntent); assertEquals(sound, retrievedSound); }
static String getSound(Intent pushIntent) { String sound = pushIntent.getStringExtra(EXTRA_SOUND_ALT); return sound == null ? pushIntent.getStringExtra(EXTRA_SOUND) : sound; }
PushIntentUtils { static String getSound(Intent pushIntent) { String sound = pushIntent.getStringExtra(EXTRA_SOUND_ALT); return sound == null ? pushIntent.getStringExtra(EXTRA_SOUND) : sound; } }
PushIntentUtils { static String getSound(Intent pushIntent) { String sound = pushIntent.getStringExtra(EXTRA_SOUND_ALT); return sound == null ? pushIntent.getStringExtra(EXTRA_SOUND) : sound; }  }
PushIntentUtils { static String getSound(Intent pushIntent) { String sound = pushIntent.getStringExtra(EXTRA_SOUND_ALT); return sound == null ? pushIntent.getStringExtra(EXTRA_SOUND) : sound; }   }
PushIntentUtils { static String getSound(Intent pushIntent) { String sound = pushIntent.getStringExtra(EXTRA_SOUND_ALT); return sound == null ? pushIntent.getStringExtra(EXTRA_SOUND) : sound; }    }