removed try catch from test case & formatted code