}
assertThat("Expected temporary file to exist after writing to it", tempFile.exists(), equalTo(true));
assertThat("Expected temporary file to not be a directory", tempFile.isDirectory(), equalTo(false));
assertThat("Expected temporary file to have the size of the contents written to it", tempFile.length(), equalTo((long) contents.length));
assertThat("Expected temporary file to be readable", tempFile.canRead(), equalTo(true));
assertThat("Expected temporary file to be writeable", tempFile.canWrite(), equalTo(true));
// Windows systems don't support the concept of checking for executability
if (connection.getHostOperatingSystem() == OperatingSystemFamily.UNIX) {
assertFalse("Expected temporary file to not be executable", tempFile.canExecute());