@Test
void createKeystore_errorPropertiesFile() throws IOException {

    final KeystoreHelper keystoreHelper = new KeystoreHelper();
    if (FileUtils.POSIX_ENABLED) {
        Files.setPosixFilePermissions(systemProperties.toPath(), PosixFilePermissions.fromString("---------"));
    } else {
        systemProperties.setWritable(false);
    }
    assertThrows(KeyStoreCreationException.class, () -> KeystoreCreator.updateSystemPropertiesFile(keystoreHelper, keystoreFile, systemProperties.getPath()));
    if (FileUtils.POSIX_ENABLED) {
        Files.setPosixFilePermissions(systemProperties.toPath(), PosixFilePermissions.fromString("rwxrwxrwx"));
    } else {
        systemProperties.setWritable(true);
    }
    Files.delete(systemProperties.toPath());
}