@Test public void shouldReturnPackageNameIfDataStringFollowsSpecificPattern() { val packageName = IntentUtils.packageNameFrom("package:com.abc"); assertThat(packageName, is("com.abc")); }
@NonNull public static String packageNameFrom(final String intentDataString) { val dataArray = nullToEmpty(intentDataString).split(":"); return (dataArray.length == 2) ? dataArray[1] : ""; }
IntentUtils { @NonNull public static String packageNameFrom(final String intentDataString) { val dataArray = nullToEmpty(intentDataString).split(":"); return (dataArray.length == 2) ? dataArray[1] : ""; } }
IntentUtils { @NonNull public static String packageNameFrom(final String intentDataString) { val dataArray = nullToEmpty(intentDataString).split(":"); return (dataArray.length == 2) ? dataArray[1] : ""; } private  IntentUtils(); }
IntentUtils { @NonNull public static String packageNameFrom(final String intentDataString) { val dataArray = nullToEmpty(intentDataString).split(":"); return (dataArray.length == 2) ? dataArray[1] : ""; } private  IntentUtils(); @NonNull static String packageNameFrom(final String intentDataString); }
IntentUtils { @NonNull public static String packageNameFrom(final String intentDataString) { val dataArray = nullToEmpty(intentDataString).split(":"); return (dataArray.length == 2) ? dataArray[1] : ""; } private  IntentUtils(); @NonNull static String packageNameFrom(final String intentDataString);  }