StandardCrimeListModel implements CrimeListModel { @Override public List<Crime> getCrimes() { return lab.getCrimes(); } StandardCrimeListModel(CrimeLab lab); @Override List<Crime> getCrimes(); @Override Crime getCrime(UUID uuid);  }
@Test public void getCrimes_returnsTheCrimesStoredInCrimeLab_whenCalled() { CrimeLab lab = mock(CrimeLab.class); List<Crime> crimes = new ArrayList<>(); crimes.add(new Crime()); when(lab.getCrimes()).thenReturn(crimes); StandardCrimeListModel model = new StandardCrimeListModel(lab); List<Crime> res = model.getCrimes(); assertThat(res, is(equalTo(crimes))); }