@Nullable
  public static <T> T getLastElement(List<T> list) {
    Assert.that(list.size() > 0);

    return list.get(list.size() - 1);
  }
(Partial) replacement for Arrays.copyOfRange, which is only available in JDK6.
spock-core/src/main/java/org/spockframework/util/CollectionUtil.java