// Path: app/src/main/java/de/codecentric/dao/NewsDao.java
// public interface NewsDao {
// 
//     List<News> getAllNews();
// 
//     void saveNews(News n);
// }
// 
// Path: app/src/main/java/de/codecentric/domain/News.java
// @Entity(name = "news")
// @NamedQueries({ @NamedQuery(name = "findAllNews", query = "from news")})
// public class News {
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     private long id;
// 
//     @Column(length = 2048)
//     private String text;
// 
//     public News() {
//         // JPA default constructor
//     }
// 
//     public String getText() {
//         return text;
//     }
// 
//     public void setText(String text) {
//         this.text = text;
//     }
// }
// 
// Path: app/src/main/java/de/codecentric/Application.java
// @EnableAutoConfiguration
// @SpringBootApplication
// @ComponentScan
// @Import(ApplicationWebConfiguration.class)
// public class Application extends SpringBootServletInitializer {
// 
//     public static void main(String[] args) {
//         SpringApplication.run(Application.class, args);
//     }
// 
//     @Override
//     protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
//         return application.sources(Application.class);
//     }
// }


import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view;
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import de.codecentric.dao.NewsDao;
import de.codecentric.domain.News;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.servlet.View;
import de.codecentric.Application;
import java.util.Collections;
package de.codecentric.controller;





@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class)
@WebAppConfiguration
public class VenueMapControllerTest {

    @InjectMocks
    VenueMapController controller;

    @Mock
    View mockView;

    @Mock
    NewsDao newsDao;

    private MockMvc mockMvc;

    @Before
    public void setup() {
        MockitoAnnotations.initMocks(this);
        mockMvc = standaloneSetup(controller).setSingleView(mockView).build();
    }

    @Test
    public void testVenueMapController() throws Exception {
// Path: app/src/main/java/de/codecentric/dao/NewsDao.java
// public interface NewsDao {
// 
//     List<News> getAllNews();
// 
//     void saveNews(News n);
// }
// 
// Path: app/src/main/java/de/codecentric/domain/News.java
// @Entity(name = "news")
// @NamedQueries({ @NamedQuery(name = "findAllNews", query = "from news")})
// public class News {
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     private long id;
// 
//     @Column(length = 2048)
//     private String text;
// 
//     public News() {
//         // JPA default constructor
//     }
// 
//     public String getText() {
//         return text;
//     }
// 
//     public void setText(String text) {
//         this.text = text;
//     }
// }
// 
// Path: app/src/main/java/de/codecentric/Application.java
// @EnableAutoConfiguration
// @SpringBootApplication
// @ComponentScan
// @Import(ApplicationWebConfiguration.class)
// public class Application extends SpringBootServletInitializer {
// 
//     public static void main(String[] args) {
//         SpringApplication.run(Application.class, args);
//     }
// 
//     @Override
//     protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
//         return application.sources(Application.class);
//     }
// }


// Path: app/src/test/java/de/codecentric/controller/VenueMapControllerTest.java
import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view;
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import de.codecentric.dao.NewsDao;
import de.codecentric.domain.News;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.servlet.View;
import de.codecentric.Application;
import java.util.Collections;

package de.codecentric.controller;





@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = Application.class)
@WebAppConfiguration
public class VenueMapControllerTest {

    @InjectMocks
    VenueMapController controller;

    @Mock
    View mockView;

    @Mock
    NewsDao newsDao;

    private MockMvc mockMvc;

    @Before
    public void setup() {
        MockitoAnnotations.initMocks(this);
        mockMvc = standaloneSetup(controller).setSingleView(mockView).build();
    }

    @Test
    public void testVenueMapController() throws Exception {
        when(newsDao.getAllNews()).thenReturn(Collections.<News>emptyList());