MetaDataUtils { @Nullable public static String getSharedPermission(Context context) { Bundle metaData = getMetaData(context); return getMetaValue(metaData, APP_SHARED_PERMISSION); } 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 testGetSharedPermission() throws Exception { String expected = "com.owlr.PERMISSION"; when(bundle.getString(MetaDataUtils.APP_SHARED_PERMISSION)).thenReturn(expected); assertThat(MetaDataUtils.getSharedPermission(context)).isEqualTo(expected); }