/*
 * Copyright 2016 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.stefanengineering.api;

import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class ApiControllerTests {

}

@@ -1,687 +1,594 @@
-/*%0A * Copyright 2016 the original author or authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.stefanengineering.api;%0A%0Aimport org.junit.runner.RunWith
+package com.stefanengineering.api;%0A%0Aimport static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
 ;%0Aim
@@ -642,24 +642,67 @@
 ngBootTest;%0A
+import org.springframework.http.MediaType;%0A
 import org.s
@@ -749,16 +749,69 @@
 gRunner;
+%0Aimport org.springframework.test.web.servlet.MockMvc;
 %0A%0A@RunWi
@@ -849,16 +849,38 @@
 ootTest%0A
+@AutoConfigureMockMvc%0A
 public c
@@ -906,10 +906,307 @@
 ests %7B%0A%0A
+    @Autowired%0A    private MockMvc mockMvc;%0A%0A    @Test%0A    public void usersShouldBeOkAndJson() throws Exception %7B%0A%0A        this.mockMvc.perform(get(%22/api/users%22)).andDo(print()).andExpect(status().isOk())%0A                .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8));%0A%0A    %7D%0A
 %7D%0A

Test if /users route is 200 and is json