test_class.file: java_src/src/test/java/com/google/crypto/tink/ConfigTest.java
test_class.identifier: ConfigTest
test_case.body: @Test
    public void testRegisterKeyType_NoCatalogue_shouldThrowException() throws Exception {
      KeyTypeEntry entry = KeyTypeEntry.newBuilder().setCatalogueName("DoesNotExist").build();
      try {
        Config.registerKeyType(entry);
        fail("Expected GeneralSecurityException");
      } catch (GeneralSecurityException e) {
        // expected
      }
    }
test_case.class_method_signature: ConfigTest.testRegisterKeyType_NoCatalogue_shouldThrowException()
test_case.full_signature: @Test public void testRegisterKeyType_NoCatalogue_shouldThrowException()
test_case.identifier: testRegisterKeyType_NoCatalogue_shouldThrowException
test_case.invocations: build setCatalogueName newBuilder registerKeyType fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRegisterKeyType_NoCatalogue_shouldThrowException()
focal_class.file: java_src/src/main/java/com/google/crypto/tink/Config.java
focal_class.identifier: Config
focal_class.class_method_signature: Config.getTinkKeyTypeEntry(
        String catalogueName,
        String primitiveName,
        String keyProtoName,
        int keyManagerVersion,
        boolean newKeyAllowed)
focal_class.full_signature: public static KeyTypeEntry getTinkKeyTypeEntry(
        String catalogueName,
        String primitiveName,
        String keyProtoName,
        int keyManagerVersion,
        boolean newKeyAllowed)
focal_class.identifier: getTinkKeyTypeEntry
focal_class.modifiers: public static
focal_class.parameters: (
        String catalogueName,
        String primitiveName,
        String keyProtoName,
        int keyManagerVersion,
        boolean newKeyAllowed)
focal_class.return: KeyTypeEntry
focal_class.signature: KeyTypeEntry getTinkKeyTypeEntry(
        String catalogueName,
        String primitiveName,
        String keyProtoName,
        int keyManagerVersion,
        boolean newKeyAllowed)
focal_class.class_method_signature: Config.register(RegistryConfig config)
focal_class.full_signature: public static void register(RegistryConfig config)
focal_class.identifier: register
focal_class.modifiers: public static
focal_class.parameters: (RegistryConfig config)
focal_class.return: void
focal_class.signature: void register(RegistryConfig config)
focal_class.class_method_signature: Config.registerKeyType(KeyTypeEntry entry)
focal_class.full_signature: public static void registerKeyType(KeyTypeEntry entry)
focal_class.identifier: registerKeyType
focal_class.modifiers: public static
focal_class.parameters: (KeyTypeEntry entry)
focal_class.return: void
focal_class.signature: void registerKeyType(KeyTypeEntry entry)
focal_class.class_method_signature: Config.validate(KeyTypeEntry entry)
focal_class.full_signature: private static void validate(KeyTypeEntry entry)
focal_class.identifier: validate
focal_class.modifiers: private static
focal_class.parameters: (KeyTypeEntry entry)
focal_class.return: void
focal_class.signature: void validate(KeyTypeEntry entry)
focal_method.body: public static void registerKeyType(KeyTypeEntry entry) throws GeneralSecurityException {
      validate(entry);
      // Catalogues are no longer supported; we simply return on those catalogues which have been
      // removed, as the key managers will be registered already.
      if (entry.getCatalogueName().equals("TinkAead")
          || entry.getCatalogueName().equals("TinkMac")
          || entry.getCatalogueName().equals("TinkHybridDecrypt")
          || entry.getCatalogueName().equals("TinkHybridEncrypt")
          || entry.getCatalogueName().equals("TinkPublicKeySign")
          || entry.getCatalogueName().equals("TinkPublicKeyVerify")
          || entry.getCatalogueName().equals("TinkStreamingAead")
          || entry.getCatalogueName().equals("TinkDeterministicAead")) {
        return;
      }
      Catalogue<?> catalogue = Registry.getCatalogue(entry.getCatalogueName());
      Registry.registerPrimitiveWrapper(catalogue.getPrimitiveWrapper());
      KeyManager<?> keyManager =
          catalogue.getKeyManager(
              entry.getTypeUrl(), entry.getPrimitiveName(), entry.getKeyManagerVersion());
      Registry.registerKeyManager(keyManager, entry.getNewKeyAllowed());
    }
focal_method.class_method_signature: Config.registerKeyType(KeyTypeEntry entry)
focal_method.full_signature: public static void registerKeyType(KeyTypeEntry entry)
focal_method.identifier: registerKeyType
focal_method.invocations: validate equals getCatalogueName equals getCatalogueName equals getCatalogueName equals getCatalogueName equals getCatalogueName equals getCatalogueName equals getCatalogueName equals getCatalogueName getCatalogue getCatalogueName registerPrimitiveWrapper getPrimitiveWrapper getKeyManager getTypeUrl getPrimitiveName getKeyManagerVersion registerKeyManager getNewKeyAllowed
focal_method.modifiers: public static
focal_method.parameters: (KeyTypeEntry entry)
focal_method.return: void
focal_method.signature: void registerKeyType(KeyTypeEntry entry)