@Test
public void testGetSubStringContainer() {

  StringContainer a = new StringContainer();
  try {
    a.getSubStringContainer(0, 1);
  } catch (Exception e) {
    assertTrue(e instanceof IndexOutOfBoundsException);
  }
  a.addTail("a", "bbb", "cc");
  assertEquals("", a.getSubStringContainer(1, 0).toString());
  assertEquals("a", a.getSubStringContainer(0, 0).toString());
  assertEquals("bbbcc", a.getSubStringContainer(1, -1).toString());
  assertEquals("bbb", a.getSubStringContainer(-2, -2).toString());
  try {
    a.getSubStringContainer(1, 4);
  } catch (Exception e) {
    assertTrue(e instanceof IndexOutOfBoundsException);
  }
  a.addHead("dd", "eeee");
  assertEquals("eeeea", a.getSubStringContainer(1, 2).toString());
  assertEquals("eeeea", a.getSubStringContainer(1, -3).toString());
  assertEquals("dd", a.getSubStringContainer(0, 0).toString());
  assertEquals("cc", a.getSubStringContainer(-1, -1).toString());
  assertEquals("ddeeeeabbbcc", a.getSubStringContainer(-5, -1).toString());
  try {
    a.getSubString(9);
  } catch (Exception e) {
    assertTrue(e instanceof IndexOutOfBoundsException);
  }
}