### Question:
VersionHandler { static boolean isReadyToRollback() { LoggingService.logDebug(MODULE_NAME, "Checking is ready to rollback"); String[] backupsFiles = new File(BACKUPS_DIR).list(); boolean isReadyToRollback = !(backupsFiles == null || backupsFiles.length == 0); LoggingService.logDebug(MODULE_NAME, "Is ready to rollback : " + isReadyToRollback); return isReadyToRollback; }    }### Answer:
@Test public void isReadyToRollbackFalse() { when(file.list()).thenReturn(null); assertFalse(VersionHandler.isReadyToRollback()); Mockito.verify(file).list(); verifyStatic(LoggingService.class, atLeastOnce()); LoggingService.logDebug(MODULE_NAME, "Is ready to rollback : false"); }
@Test public void isReadyToRollbackTrue() { assertTrue(VersionHandler.isReadyToRollback()); Mockito.verify(file).list(); verifyStatic(LoggingService.class, atLeastOnce()); LoggingService.logDebug(MODULE_NAME, "Is ready to rollback : true"); }