return new StandardPasswordEncoder();
}
@Bean(name = "translationService")
public Service translationService() {
Service translationService = mock(Service.class);
when(translationService.translateFiles(Matchers.<TranslationRequest>anyObject())).thenAnswer(new Answer<TranslationResult>() {
@Override
public TranslationResult answer(InvocationOnMock invocation) throws Throwable {
final TranslationResult result = new TranslationResult();
result.setTranslatedIds(new ArrayList<Long>(Collections.nCopies(7, 0L)));
return result;
}
});
when(translationService.preCacheChart(any(Long[].class), anyInt(), anyInt(), any(SpectrumType[].class), anyFloat(),
anyFloat(), anyDouble(), anyDouble())).thenAnswer(new Answer<PreCachingResult>() {
@Override
public PreCachingResult answer(InvocationOnMock invocation) throws Throwable {
return new PreCachingResult();
}