@Test
public void testAdminPermissions() throws IOException, UnauthorizedException, NotFoundException {

	final AccessEnforcement accessEnforcement = ClientPermissionLoader
			.loadIniFile(new File("config/client/clients.config"));
	Assert.assertNotNull(accessEnforcement);
	// Check admin permissions for PRF Secret
	accessEnforcement.enforceAccess(admin, prfSecret, Permissions.GENERATE);
	accessEnforcement.enforceAccess(admin, prfSecret, Permissions.DELETE);
	accessEnforcement.enforceAccess(admin, prfSecret, Permissions.ENABLE);
	accessEnforcement.enforceAccess(admin, prfSecret, Permissions.DISABLE);
	accessEnforcement.enforceAccess(admin, prfSecret, Permissions.INFO);
	try {
		accessEnforcement.enforceAccess(admin, prfSecret, Permissions.EXPONENTIATE);
		Assert.fail("Expected unauthorized exception");
	} catch (UnauthorizedException expected) {
	}
	try {
		accessEnforcement.enforceAccess(admin, prfSecret, Permissions.STORE);
		Assert.fail("Expected unauthorized exception");
	} catch (UnauthorizedException expected) {
	}
	try {
		accessEnforcement.enforceAccess(admin, prfSecret, Permissions.READ);
		Assert.fail("Expected unauthorized exception");
	} catch (UnauthorizedException expected) {
	}
	try {
		accessEnforcement.enforceAccess(admin, prfSecret, Permissions.SIGN);
		Assert.fail("Expected unauthorized exception");
	} catch (UnauthorizedException expected) {
	}
	// Check admin permissions for Store secret
	accessEnforcement.enforceAccess(admin, mySecret, Permissions.DELETE);
	accessEnforcement.enforceAccess(admin, mySecret, Permissions.ENABLE);
	accessEnforcement.enforceAccess(admin, mySecret, Permissions.DISABLE);
	accessEnforcement.enforceAccess(admin, mySecret, Permissions.INFO);
	try {
		accessEnforcement.enforceAccess(admin, mySecret, Permissions.GENERATE);
		Assert.fail("Expected unauthorized exception");
	} catch (UnauthorizedException expected) {
	}
	try {
		accessEnforcement.enforceAccess(admin, mySecret, Permissions.EXPONENTIATE);
		Assert.fail("Expected unauthorized exception");
	} catch (UnauthorizedException expected) {
	}
	try {
		accessEnforcement.enforceAccess(admin, mySecret, Permissions.STORE);
		Assert.fail("Expected unauthorized exception");
	} catch (UnauthorizedException expected) {
	}
	try {
		accessEnforcement.enforceAccess(admin, mySecret, Permissions.READ);
		Assert.fail("Expected unauthorized exception");
	} catch (UnauthorizedException expected) {
	}
	try {
		accessEnforcement.enforceAccess(admin, mySecret, Permissions.SIGN);
		Assert.fail("Expected unauthorized exception");
	} catch (UnauthorizedException expected) {
	}
}