fixed test (invalid key graph)
use inner class to hide graphlistener methods