### Question:
EmbeddedOpenDJBackupManager { void createOpenDJBackup() throws ConfiguratorException { createBackupDirectories(); File backupFile = getBackupFileLocation(); File opendjDirectory = new File(baseDirectory, OPENDJ_DIR); try { zipUtils.zipDirectory(opendjDirectory, backupFile); } catch (IOException e) { throw new ConfiguratorException("Failed to create OpenDJ backup: " + e.getMessage()); } } EmbeddedOpenDJBackupManager(Debug logger, ZipUtils zipUtils, String baseDirectory); void createBackupDirectories();  }### Answer:
@Test public void whenInUpgradeRequiredStateItShouldBackupOpenDjDirectory() throws Exception { EmbeddedOpenDJBackupManager openDJBackupManager = setupInstallOpenDJRequiringUpgrade(); openDJBackupManager.createOpenDJBackup(); verifyBackupZipFileCreated(); verifyContentsOfBackupZip(); }
@Test public void whenInUpgradeRequiredStateItShouldCreateUpgradeDirectory() throws Exception { EmbeddedOpenDJBackupManager openDJBackupManager = setupInstallOpenDJRequiringUpgrade(); openDJBackupManager.createOpenDJBackup(); assertThat(new File(baseDirectory, "upgrade").exists()).isTrue(); }