in reply to what and how mocking test is?

The answer is: yes. You could start with Test::MockDBI, then follow the example.