@Udf
  public int instr(final String str, final String substring) {
    return instr(str, substring, 1);
  }
@Test
  public void shouldExtractFromEndForNegativePositions() {
    assertThat(udf.instr("CORPORATE FLOOR", "OR", -1), is(14));
    assertThat(udf.instr("CORPORATE FLOOR", "OR", -3), is(5));
    assertThat(udf.instr("CORPORATE FLOOR", "OR", -3, 2), is(2));
    assertThat(udf.instr("CORPORATE FLOOR", "OR", -3, 5), is(0));

    assertThat(udf.instr("CORPORATE FLOOR", "ATE", -1), is(7));
    assertThat(udf.instr("CORPORATE FLOOR", "ATE", -3), is(7));
    assertThat(udf.instr("CORPORATE FLOOR", "ATE", -3, 2), is(0));
  }