Add command listener and test cases

Signed-off-by: Kristian Duske <kristian.duske@gmail.com>