@Override
  public synchronized UdfFactory getUdfFactory(final FunctionName functionName) {
    final UdfFactory udfFactory = udfs.get(functionName.text().toUpperCase());
    if (udfFactory == null) {
      throw new KsqlException(
          "Can't find any functions with the name '" + functionName.text() + "'");
    }
    return udfFactory;
  }
@Test
  public void shouldThrowExceptionIfNoFunctionsWithNameExist() {
    // When:
    final Exception e = assertThrows(
        KsqlException.class,
        () -> functionRegistry.getUdfFactory(of("foo_bar"))
    );

    // Then:
    assertThat(e.getMessage(), containsString(
        "'foo_bar'"));
  }