public static String lastElement(List<String> strings) {
    checkArgument(!strings.isEmpty(), "empty list");
    return strings.get(strings.size() - 1);
  }
@Test
  public void testLastElementSingle() {
    assertEquals("first", lastElement(l("first")));
  }