### Question:
WikiTemplateMigration extends AbstractHibernateDataMigration { @Override public boolean shouldExecute(XWikiDBVersion startupVersion) { return wikiDescriptorManager.getCurrentWikiId().equals(wikiDescriptorManager.getMainWikiId()); }  @Override String getDescription(); @Override XWikiDBVersion getVersion(); @Override boolean shouldExecute(XWikiDBVersion startupVersion);  }### Answer:
@Test public void shouldExecuteTrue() throws Exception { when(wikiDescriptorManager.getCurrentWikiId()).thenReturn("mainWiki"); XWikiDBVersion version = new XWikiDBVersion(52000); assertTrue(mocker.getComponentUnderTest().shouldExecute(version)); }
@Test public void shouldExecuteFalse() throws Exception { when(wikiDescriptorManager.getCurrentWikiId()).thenReturn("subwiki"); XWikiDBVersion version = new XWikiDBVersion(52000); assertFalse(mocker.getComponentUnderTest().shouldExecute(version)); }