@Test
public void testRegisterKeyManager_deprecated_keyManagerIsNull_shouldThrowException()
    throws Exception {

  try {
    Registry.registerKeyManager(AeadConfig.AES_CTR_HMAC_AEAD_TYPE_URL, null);
    fail("Expected IllegalArgumentException.");
  } catch (IllegalArgumentException e) {
    assertThat(e.toString()).contains("must be non-null");
  }
}