Added some test cases for backend.py