@Test
public void testFailMissingRequired() throws IOException {

    Object downloads = ConfigFactory.parseString(
    AppSettings.SECRET_MANAGER_DOWNLOADS + "=[" +
        "{" +
            "secret = \"projects/" + projectId + "/secrets/missing-required/versions/latest\"," +
            "file = \"" + secretsDirectory.resolve("missing-required.txt") + "\"" +
        "}" +
    "]").getAnyRef(AppSettings.SECRET_MANAGER_DOWNLOADS);
    try(SettingsOverride override = SettingsOverride.apply(Map.of(AppSettings.SECRET_MANAGER_DOWNLOADS, downloads))) {
        try {
            SecretManager.downloadSecrets();
            fail();
        }
        catch (RuntimeException e) {
            // Expected
            assertTrue(e.getCause().getClass().equals(NotFoundException.class));
        }
    }
}