def METHOD_NAME(self) -> None:
    """Tests that get_generator_class_by_id raises exception
    when it isn't found.
    """
    generator_id = 'aajfejaekj'
    with self.assertRaisesRegex(
        KeyError, generator_id
    ):
        value_generators_domain.Registry.get_generator_class_by_id(
            generator_id
        )