Implemented unit tests for scan command.