MetaDataUtils { @Nullable protected static String getMetaValue(Bundle metaData, String appSharedPermission) { if (metaData != null) { return metaData.getString(appSharedPermission); } return null; } private  MetaDataUtils(); @Nullable static String getSharedAuthorityMatcher(Context context); @Nullable static String getSharedPermission(Context context); @Nullable static String getAppAuthority(Context context); static final String APP_AUTHORITY_MATCHER; static final String APP_SHARED_PERMISSION; static final String APP_AUTHORITY; }
@Test public void testGetMetaValue() throws Exception { when(bundle.getString("app_key")).thenReturn("result"); final String result = MetaDataUtils.getMetaValue(bundle, "app_key"); assertThat(result).isEqualTo("result"); }