// Path: src/main/java/com/hillert/botanic/MainApp.java
// @SpringBootApplication
// public class MainApp {
// 
// 	public static final String GZIP_COMPRESSION_MIME_TYPES =
// 		MediaType.APPLICATION_JSON_VALUE + "," + "application/javascript" + "," + "text/css";
// 
// 	@Bean
// 	public RepositoryRestConfigurer repositoryRestConfigurer() {
// 		return new RepositoryRestConfigurerAdapter() {
// 			@Override
// 			public void configureRepositoryRestConfiguration(
// 								RepositoryRestConfiguration config) {
// 				config.exposeIdsFor(Plant.class, Image.class, Garden.class);
// 				config.setBasePath("/api");
// 			}
// 		};
// 	}
// 
// 	/**
// 	 * Main class initializes the Spring Application Context and populates seed
// 	 * data using {@link SeedDataService}.
// 	 *
// 	 * @param args Not used.
// 	 */
// 	public static void main(String[] args) {
// 		final ConfigurableApplicationContext context = SpringApplication.run(MainApp.class, args);
// 		final SeedDataService seedDataService = context.getBean(SeedDataService.class);
// 		seedDataService.populateSeedData();
// 	}
// 
// 	@Bean
// 	public Jackson2ObjectMapperBuilderCustomizer addCustomBigDecimalDeserialization() {
// 		return new Jackson2ObjectMapperBuilderCustomizer() {
// 
// 			@Override
// 			public void customize(Jackson2ObjectMapperBuilder jacksonObjectMapperBuilder) {
// 				jacksonObjectMapperBuilder.dateFormat(new ISO8601DateFormatWithMilliSeconds());
// 			}
// 
// 		};
// 	}
// 
// }
// 
// Path: src/main/java/com/hillert/botanic/service/SeedDataService.java
// public interface SeedDataService {
// 
// 	void populateSeedData();
// 
// }


import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import com.hillert.botanic.MainApp;
import com.hillert.botanic.service.SeedDataService;
/*
 * Copyright 2014-2018 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 com.hillert.botanic.controller;




/**
*
* @author Gunnar Hillert
* @since 1.0
*
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = MainApp.class)
@WebAppConfiguration
public abstract class BaseControllerTests {

	protected MockMvc mockMvc;

	@Autowired
	private WebApplicationContext wac;

	@Autowired
// Path: src/main/java/com/hillert/botanic/MainApp.java
// @SpringBootApplication
// public class MainApp {
// 
// 	public static final String GZIP_COMPRESSION_MIME_TYPES =
// 		MediaType.APPLICATION_JSON_VALUE + "," + "application/javascript" + "," + "text/css";
// 
// 	@Bean
// 	public RepositoryRestConfigurer repositoryRestConfigurer() {
// 		return new RepositoryRestConfigurerAdapter() {
// 			@Override
// 			public void configureRepositoryRestConfiguration(
// 								RepositoryRestConfiguration config) {
// 				config.exposeIdsFor(Plant.class, Image.class, Garden.class);
// 				config.setBasePath("/api");
// 			}
// 		};
// 	}
// 
// 	/**
// 	 * Main class initializes the Spring Application Context and populates seed
// 	 * data using {@link SeedDataService}.
// 	 *
// 	 * @param args Not used.
// 	 */
// 	public static void main(String[] args) {
// 		final ConfigurableApplicationContext context = SpringApplication.run(MainApp.class, args);
// 		final SeedDataService seedDataService = context.getBean(SeedDataService.class);
// 		seedDataService.populateSeedData();
// 	}
// 
// 	@Bean
// 	public Jackson2ObjectMapperBuilderCustomizer addCustomBigDecimalDeserialization() {
// 		return new Jackson2ObjectMapperBuilderCustomizer() {
// 
// 			@Override
// 			public void customize(Jackson2ObjectMapperBuilder jacksonObjectMapperBuilder) {
// 				jacksonObjectMapperBuilder.dateFormat(new ISO8601DateFormatWithMilliSeconds());
// 			}
// 
// 		};
// 	}
// 
// }
// 
// Path: src/main/java/com/hillert/botanic/service/SeedDataService.java
// public interface SeedDataService {
// 
// 	void populateSeedData();
// 
// }


// Path: src/test/java/com/hillert/botanic/controller/BaseControllerTests.java
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import com.hillert.botanic.MainApp;
import com.hillert.botanic.service.SeedDataService;

/*
 * Copyright 2014-2018 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 com.hillert.botanic.controller;




/**
*
* @author Gunnar Hillert
* @since 1.0
*
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = MainApp.class)
@WebAppConfiguration
public abstract class BaseControllerTests {

	protected MockMvc mockMvc;

	@Autowired
	private WebApplicationContext wac;

	@Autowired
	SeedDataService seedDataService;