private Set<Object> getSources(MergedContextConfiguration mergedConfig) {
   Set<Object> sources = new LinkedHashSet<Object>();
   sources.addAll(Arrays.asList(mergedConfig.getClasses()));
   sources.addAll(Arrays.asList(mergedConfig.getLocations()));
   if (sources.isEmpty()) {
     throw new IllegalStateException(
         "No configuration classes or locations found in @SpringApplicationConfiguration. "
             + "For default configuration detection to work you need Spring 4.0.3 or better (found "
             + SpringVersion.getVersion()
             + ").");
   }
   return sources;
 }