move event binding via configuration to its own method

add basic test for event binding via configuration