@Test
public void testGetKeyManager_legacy_badTypeUrl_shouldThrowException() throws Exception {

  String badTypeUrl = "bad type URL";
  try {
    Registry.getKeyManager(badTypeUrl);
    fail("Expected GeneralSecurityException.");
  } catch (GeneralSecurityException e) {
    assertExceptionContains(e, "No key manager found");
    assertExceptionContains(e, badTypeUrl);
  }
}