Added test cases. Fixed indentation error.