this.testLocaleServiceImpl.setProjectIterationDAO(projectIterationDAO);
this.testLocaleServiceImpl.setProjectDAO(projectDAO);
this.testLocaleServiceImpl.setLocaleDAO(localeDAO);
Set<HLocale> iterationLocales = new HashSet<HLocale>();
iterationLocales.add(new HLocale(LocaleId.EN_US));
iterationLocales.add(new HLocale(LocaleId.DE));
when(hProjectIteration.getId()).thenReturn(1L);
when(hProjectIteration.getCustomizedLocales()).thenReturn(
iterationLocales);
when(projectIterationDAO.getBySlug(projectSlug, versionSlug))
.thenReturn(hProjectIteration);
Set<HLocale> projectLocales = new HashSet<HLocale>();
projectLocales.add(new HLocale(LocaleId.ES));
when(hProject.getId()).thenReturn(1L);
when(hProject.getCustomizedLocales()).thenReturn(projectLocales);
when(projectDAO.getBySlug(projectSlug)).thenReturn(hProject);
List<HLocale> defaultLocales = new ArrayList<HLocale>();
defaultLocales.add(new HLocale(LocaleId.FR));
defaultLocales.add(new HLocale(LocaleId.EN));
defaultLocales.add(new HLocale(LocaleId.DE));
when(localeDAO.findAllActiveAndEnabledByDefault()).thenReturn(
defaultLocales);
}