Generalized Bell inequality and a method for its verification