public static boolean toBoolean(final Literal literal, final String propertyName) {
    final String value = literal.getValue().toString();
    final boolean isTrue = value.equalsIgnoreCase("true");
    final boolean isFalse = value.equalsIgnoreCase("false");
    if (!isTrue && !isFalse) {
      throw new KsqlException("Property '" + propertyName + "' is not a boolean value");
    }
    return isTrue;
  }
@Test
  public void shouldThrowConvertingOtherLiteralTypesToBoolean() {
    // When:
    final Exception e = assertThrows(
        KsqlException.class,
        () -> LiteralUtil.toBoolean(new LongLiteral(10), "bob")
    );

    // Then:
    assertThat(e.getMessage(), containsString("Property 'bob' is not a boolean value"));
  }