public static String getSelectQuery(@Nullable String table, @Nullable String query) {
    if (table != null && query != null) {
      throw new IllegalArgumentException("withTable() can not be used together with withQuery()");
    } else if (table != null) {
      return "SELECT * FROM " + SingleStoreUtil.escapeIdentifier(table);
    } else if (query != null) {
      return query;
    } else {
      throw new IllegalArgumentException("One of withTable() or withQuery() is required");
    }
  }
@Test
  public void testGetSelectQueryBothNonNulls() {
    assertThrows(
        "withTable() can not be used together with withQuery()",
        IllegalArgumentException.class,
        () -> SingleStoreUtil.getSelectQuery("table", "SELECT * FROM table"));
  }