JASCIS-70: Add selection of correct handler with test
JASCIS-70: Make tests pass