StatusHandler { void initReport(int totalJobNumber) { this.preExistingJobNumber = totalJobNumber; this.newJobNumber = 0; this.serviceStartDate = LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME); writeStatus(); }    }
@Test public void canInitReport() throws Exception { statusHandler.initReport(10); assertThat(Files.exists(statusFilePath), equalTo(true)); Files.delete(statusFilePath); assertThat(Files.exists(statusFilePath), equalTo(false)); }