custom error message for assertThat() in junit?
I would prefer the following, to avoid the reader believing that you wish to assert that the file name doesn't exist..!
assertThat("File name should exist", file.exists(), is(equalTo(true)));
Use the overloaded assertThat
method
assertThat("File name doesn't exist", file.exists(), is(equalTo(true)));