void handleLine(final String line) {
    final String trimmedLine = Optional.ofNullable(line).orElse("").trim();
    if (trimmedLine.isEmpty()) {
      return;
    }

    handleStatements(trimmedLine);
  }
@Test
  public void shouldThrowWhenTryingToSetDeniedProperty() throws Exception {
    // Given
    final KsqlRestClient mockRestClient = givenMockRestClient();
    when(mockRestClient.makeIsValidRequest("ksql.service.id"))
        .thenReturn(RestResponse.erroneous(
            NOT_ACCEPTABLE.code(),
            new KsqlErrorMessage(Errors.toErrorCode(NOT_ACCEPTABLE.code()),
                "Property cannot be set")));

    // When:
    assertThrows(IllegalArgumentException.class, () ->
        localCli.handleLine("set 'ksql.service.id'='test';"));
  }