    @Test
    public void testHasPermissions() {

        Application app = RuntimeEnvironment.application;

        String[] perms = new String[]{
                Manifest.permission.READ_SMS,
                Manifest.permission.ACCESS_FINE_LOCATION
        };

        // Wes should not have permissions before any are granted
        assertFalse(EasyPermissions.hasPermissions(app, perms));

        // Granting one permission should not make the whole set appear granted
        ShadowApplication.getInstance().grantPermissions(perms[0]);
        assertFalse(EasyPermissions.hasPermissions(app, perms));

        // Granting all permissions should make the whole set granted
        ShadowApplication.getInstance().grantPermissions(perms);
        assertTrue(EasyPermissions.hasPermissions(app, perms));
    }