@Test
public void testFailMissingOptional() throws IOException {

    Object downloads = ConfigFactory.parseString(
    AppSettings.SECRET_MANAGER_DOWNLOADS + "=[" +
        "{" +
            "secret = \"projects/" + projectId + "/secrets/missing-optional/versions/latest\"," +
            "file = \"" + secretsDirectory.resolve("missing-optional.txt") + "\"," +
            "required = false" +
        "}" +
    "]").getAnyRef(AppSettings.SECRET_MANAGER_DOWNLOADS);
    try(SettingsOverride override = SettingsOverride.apply(Map.of(AppSettings.SECRET_MANAGER_DOWNLOADS, downloads))) {
        SecretManager.downloadSecrets();
        assertFalse(Files.exists(secretsDirectory.resolve("missing-optional.txt")));
    }
}