Update Test Cases

Made custom exceptions
Fixed test cases