@Test
public void allScannersConsulted() throws Exception {

  // first scanner does not detect
  when(scanner1.hasVirus(any(StorageFileItem.class))).thenReturn(false);
  // second scanner does
  when(scanner2.hasVirus(any(StorageFileItem.class))).thenReturn(true);
  // use a deep mock here, as the scanner needs to reach into the item to post and event
  StorageFileItem item = mock(StorageFileItem.class, RETURNS_DEEP_STUBS);
  // virus is detected (by one of the scanners)
  assertThat(underTest.hasVirus(item), is(true));
  // both scanners are called
  verify(scanner1).hasVirus(item);
  verify(scanner2).hasVirus(item);
  // event is fired
  verify(eventBus).post(any(InfectedItemFoundEvent.class));
}