try
fail()
catch
public void testCantRetrieveFromEmptyList() {
try {
list.getFirst();
fail("Got Something from an empty list");
}
catch (NoSuchElementException success) {
}
}