how to check object of bufferreader is null or not in junit code example
Example: java read file bufferedreader
try {
File file = new File("data.txt");
BufferedReader reader = new BufferedReader(new FileReader(file));
String line;
while((line = reader.readLine()) != null) {
System.out.println(line);
}
} catch(IOException e) {
e.printStackTrace();
}