/*
 * Copyright 2016-2017 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.joinfaces.butterfaces;

import org.joinfaces.bootsfaces.BootsfacesSpringBootAutoConfiguration;
import org.junit.Test;
import org.junit.runner.RunWith;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.context.WebApplicationContext;

import static org.assertj.core.api.Assertions.assertThat;

@RunWith(SpringRunner.class)
@SpringBootTest(
		properties = "jsf.bootsfaces.get-jquery-from-cdn=false",
		classes = {
				EmbeddedServletContainerAutoConfiguration.class,
				BootsfacesSpringBootAutoConfiguration.class,
				ButterfacesSpringBootAutoConfiguration.class,
				ButterfacesSpringBootAutoConfiguration.ButterfacesBootsfacesAutoConfiguration.class
		},
		webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT
)
public class ButterfacesBootsfacesServletContextInitializerIT {

	@Autowired
	private WebApplicationContext applicationContext;

	@Test
	public void testOverriddenInitParam() {
		assertThat(this.applicationContext.getServletContext().getInitParameter("net.bootsfaces.get_jquery_from_cdn")).isEqualTo("true");
	}
}

@@ -714,32 +714,136 @@
 oConfiguration;%0A
+import org.joinfaces.configuration.ServletContextInitParameterConfigurationPropertiesAutoConfiguration;%0A
 import org.junit
@@ -1641,16 +1641,95 @@
 on.class
+,%0A%09%09%09%09ServletContextInitParameterConfigurationPropertiesAutoConfiguration.class
 %0A%09%09%7D,%0A%09%09

fix IT