I am writing a unit test and I am seeing the following which I don't understand. Any help is appreciated.
tempFile = File.createTempFile("temp", "file");
Files.write(tempFile.toPath(), expectedBytes);
byte[] b = Files.readAllBytes(tempFile.toPath());
Assert.equals(b, expectedBytes); // failed