CA-145685: Make tap_wanted more robust

Signed-off-by: Flavien Quesnel <flavien.quesnel@citrix.com>
CA-145685: [UnitTest] Update unit test

Signed-off-by: Flavien Quesnel <flavien.quesnel@citrix.com>
CA-145685: [UnitTest] Refactor unit test

Signed-off-by: Flavien Quesnel <flavien.quesnel@citrix.com>