How to mock close method of Buffered Reader and cover the code of IO Exception in Junit?

Viewed 22

I have a block of code below for IO operations where in i want to cover the code for catch block.

finally {
            try {
                if (br != null) {
                    br.close();
                }
            } catch (IOException ioe) {
                ioe.printStackTrace();
            }
        }
0 Answers
Related