IntentHelper { public static float getExtraFloat(final Intent intent, final String key, final float defaultValue) { return intent.getFloatExtra(key, defaultValue); } private  IntentHelper(); @NonNull static Uri getIntentData(final Intent intent); @NonNull static Uri getIntentDataNonNull(final Intent intent); @Nullable static Uri getIntentDataNullable(final Intent intent); static String getExtraString(final Intent intent, final String key, final String defaultValue); static int getExtraInt(final Intent intent, final String key, final int defaultValue); static boolean getExtraBoolean(final Intent intent, final String key, final boolean defaultValue); static float getExtraFloat(final Intent intent, final String key, final float defaultValue); static double getExtraDouble(final Intent intent, final String key, final double defaultValue); static byte getExtraByte(final Intent intent, final String key, final byte defaultValue); static short getExtraShort(final Intent intent, final String key, final short defaultValue); static char getExtraChar(final Intent intent, final String key, final char defaultValue); static long getExtraLong(final Intent intent, final String key, final long defaultValue); static CharSequence getExtraCharSequence(final Intent intent, final String key, final CharSequence defaultValue); static Bundle getExtraBundle(final Intent intent, final String key, final Bundle defaultValue); static T getExtraSerializable(final Intent intent, final String key, final T defaultValue); static T getExtraParcelable(final Intent intent, final String key, final T defaultValue);  }
@Test public void testGetFloatExtra() { final Intent intent = mock(Intent.class); IntentHelper.getExtraFloat(intent, "FloatExtra", -1.f); verify(intent).getFloatExtra("FloatExtra", -1.f); verifyNoMoreInteractions(intent); }