StandardCrimeListModel implements CrimeListModel { @Override public Crime getCrime(UUID uuid) { return lab.getCrime(uuid); } StandardCrimeListModel(CrimeLab lab); @Override List<Crime> getCrimes(); @Override Crime getCrime(UUID uuid);  }
@Test public void getCrime_returnsCrimeWithGivenUUIDFromCrimeLab_whenItExists() { CrimeLab lab = mock(CrimeLab.class); Crime targetCrime = new Crime(); targetCrime.setTitle("TargetTitle"); when(lab.getCrime(targetCrime.getId())).thenReturn(targetCrime); StandardCrimeListModel model = new StandardCrimeListModel(lab); Crime res = model.getCrime(targetCrime.getId()); assertThat(res, is(equalTo(targetCrime))); }