unit testing - JUnit test case to check if file was created -


i have created simple program wil create dat file through buffered writer , write data file , please advise junit test cases can have through can check whether file created or not in c: drive , using junit 3 , please advise.

file file = new file("c:/pathofthecreatedfile"); asserttrue(file.exists()); // todo: read file. check contains it's supposed contain