assertTrue(propertySources.get(2) instanceof StaticPropertiesPropertySource);
assertTrue(propertySources.get(3) instanceof ServletContextPropertySource);
}
public void testAddLocations() throws Exception {
final ContextLocationResolver resolverDelegate = createMock(ContextLocationResolver.class);
final PropertySource source = createMock(PropertySource.class);
ServletContextLocationsRetriever resolver = new ServletContextLocationsRetriever(servletContext, resolverDelegate, propertiesLoader) {
@Override
protected Properties getProperties() {
return new Properties();
}
@Override
protected List<PropertySource> getPropertySources(Properties properties) {
return Collections.singletonList(source);
}
};
expect(resolverDelegate.addContextLocations(isA(ConfigurationSettings.class), isA(CompositePropertySource.class))).andReturn(false);
replay(resolverDelegate, source);
resolver.getContextLocations();