@Test
public void testSubstringEndIndexLesserThanLength() throws Exception {

    Encoder encoder = new Encoder();
    String result = encoder.substring("ERT", 1, 2);
    Assertions.assertThat(result).isEqualTo("R");
}