CA-142595: [UnitTest] Add tests for the fix

Add unit tests relating to the fix proposed by Wang Yanbin.

Signed-off-by: Flavien Quesnel <flavien.quesnel@citrix.com>
CA-142595: Refactor code

Refactor code from devscan.py

Signed-off-by: Flavien Quesnel <flavien.quesnel@citrix.com>
CA-142595: [UnitTest] Add tests, following refactoring

Add unit tests, following the refactoring of devscan.py

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