public void testGetNthStringList() throws Exception {
try {
NonEmptyStringList stringList1 = new NonEmptyStringList(jcas);
stringList1.setHead("2");
stringList1.setTail(new EmptyStringList(jcas));
NonEmptyStringList stringList = new NonEmptyStringList(jcas);
stringList.setHead("1");
stringList.setTail(stringList1);
EmptyStringList emptyFsList = new EmptyStringList(jcas);
try {
emptyFsList.getNthElement(0);
assertTrue(false); // error if we get here
} catch (CASRuntimeException e) {
assertTrue(e.getMessageKey().equals(CASRuntimeException.JCAS_GET_NTH_ON_EMPTY_LIST));
System.out.print("Expected Error: ");
System.out.println(e.getMessage());