@Test
public void testSubstringEndIndexGreaterToTailLength() throws Exception {

    Encoder encoder = new Encoder();
    String result = encoder.substring("EE", 0, 2);
    Assertions.assertThat(result).isEqualTo("EE");
}