ServiceResourceResolverService { public ResourceResolver getContentMigratorResourceResolver() throws LoginException { final Map<String, Object> authenticationInfo = new HashMap<>(); authenticationInfo.put(ResourceResolverFactory.SUBSERVICE, SUBSERVICE_AECU_CONTENT_MIGRATION); return resolverFactory.getServiceResourceResolver(authenticationInfo); }  ResourceResolver getServiceResourceResolver(); ResourceResolver getContentMigratorResourceResolver(); ResourceResolver getAdminResourceResolver();  }
@Test public void getContentMigratorResourceResolver() throws LoginException { when(resolverFactory.getServiceResourceResolver(Mockito.any())).thenReturn(resolver); ResourceResolver serviceResolver = service.getContentMigratorResourceResolver(); assertEquals(resolver, serviceResolver); }