### Question:
Exercise4 { static Integer average(final List<Integer> list) { return list.isEmpty() ? 0 : Lists.sum(list) / list.size(); }    }### Answer:
@Test public void shouldCalculateAverage() { final List<Integer> list = asList(1, 2, 3); final Integer expected = 2; final Integer actual = Exercise4.average(list); assertThat(actual, is(expected)); }