throw exception if no handler is registered + tests