public void testGetNthIntegerList() throws Exception {
try {
NonEmptyIntegerList intList1 = new NonEmptyIntegerList(jcas);
intList1.setHead(2);
intList1.setTail(new EmptyIntegerList(jcas));
NonEmptyIntegerList intList = new NonEmptyIntegerList(jcas);
intList.setHead(1);
intList.setTail(intList1);
EmptyIntegerList emptyFsList = new EmptyIntegerList(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());