@Test
public void testDownload() throws IOException {

    Object downloads = ConfigFactory.parseString(
    AppSettings.SECRET_MANAGER_DOWNLOADS + "=[" +
        "{" +
            "secret = \"projects/" + projectId + "/secrets/secretstuff/versions/latest\"," +
            "file = \"" + secretsDirectory.resolve("secretstuff.txt") + "\"" +
        "}" +
    "]").getAnyRef(AppSettings.SECRET_MANAGER_DOWNLOADS);
    try(SettingsOverride override = SettingsOverride.apply(Map.of(AppSettings.SECRET_MANAGER_DOWNLOADS, downloads))) {
        SecretManager.downloadSecrets();
        String contents = Files.readString(secretsDirectory.resolve("secretstuff.txt"));
        assertEquals(contents, "This is secret stuff");
    }
}