Fix double variable declaration.
Implement test for new method.
Fix the catched exception.