Prototyping adaptive systems in smart environments using virtual reality