@Test
public void testEpisodeNotKnownByOaiPmh() throws Exception {

  Catalog episodeCatalog = CatalogImpl.newInstance();
  episodeCatalog.setURI(URI.create("/episode.xml"));
  episodeCatalog.setFlavor(MediaPackageElementFlavor.parseFlavor("dublincore/episode"));
  episodeCatalog.addTag("archive");
  MediaPackage updatedMp = createMediaPackage(episodeCatalog);
  // these are the interactions we expect with the asset manager
  mockAssetManager(updatedMp);
  // these are the interactions we expect with the security service
  mockSecurityService();
  // mock the OAI-PMH database
  SearchResult searchResultMock = mock(MockType.NICE, SearchResult.class);
  expect(searchResultMock.getItems()).andReturn(Collections.EMPTY_LIST).anyTimes();
  queryCapture = Capture.newInstance();
  expect(oaiPmhDatabaseMock.search(capture(queryCapture))).andReturn(searchResultMock);
  replayAll();
  cut.handleEvent(createSnapshot(updatedMp));
  // the OAI-PMH publication service should not be called as the media package isn't mocked in the OAI-PMH database
  verifyAll();
}