MetaDataUtils { @Nullable protected static Bundle getMetaData(Context context) { try { ApplicationInfo applicationInfo = context.getPackageManager() .getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA); return applicationInfo.metaData; } catch (PackageManager.NameNotFoundException ignored) { } 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 testGetMetaData() throws Exception { assertThat(MetaDataUtils.getMetaData(context)).isEqualTo(bundle); }