code: private static void setProperties(GenericApplicationContext newContext, Properties properties) {
          PropertiesPropertySource pps = new PropertiesPropertySource("external-props", properties);
          newContext.getEnvironment().getPropertySources().addFirst(pps);
      }
docs: Set properties into the context.
  
  @param newContext new context to add properties
  @param properties properties to add to the context