title: SpringBoot SpringApplicationBuilder
body: <p>I need to test my Spring application code by creating a Cucumber integration test. I am using SpringApplicationBuilder to start up my application before the actual logic is triggered and am using the following syntax to do so:-</p>
  
  <pre><code>application = new SpringApplicationBuilder()
      .parent(new Object[]{"classpath:file1.xml", "classpath:file2.xml"})
      .profiles("abc")
      .properties("name:value") [It has 5/6 (name:value) pairs here]*
      .showBanner(false)
      .logStartupInfo(true)
      .headless(true)
      .application()
      .run();
  </code></pre>
  
  <p>My Spring application starts up correctly. However, it does not get the values for the property (name, value) pairs that I am passing to the SpringApplicationBuilder(). I have tried the following to set them :-</p>
  
  <ol>
  <li>Using name value pairs as above</li>
  <li>List item using a HashMap of (name, value) pairs</li>
  <li>Creating a ConfigurableEnvironment, retrieving the MutablePropertySources
  and setting my properties in it.</li>
  </ol>
  
  <p>None of these options are working, so when the application starts up and the code tries to access certain System Property values, it breaks.</p>
  
  <p>Any ideas how this could be fixed.. All the help is greatly appreciated! 
  I need these properties to be Spring properties to make sure the app works correctly. Maybe I can test my code using the Spring props in some other way? If so, how do I do it?</p>