ColoredString implements EnhancedString { public CharSequence subSequence(int i, int j) { return new String(Arrays.copyOfRange(plain, i, j)); } ColoredString(String s); private  ColoredString(char[] plain, String[] codes); int length(); char charAt(int i); CharSequence subSequence(int i, int j); @Override @NotNull String toString(); @Override ColoredString replaceText(Pattern p, String rText); ColoredString patternToLower(Pattern p); ColoredString patternToUpper(Pattern p); @Override boolean equals(Object obj); @Override String getRaw();  }
@Test public void testSubSequence(){ assertEquals(plain.subSequence(5, 9), testCs.subSequence(5, 9)); }