@@ -0,0 +1,2609 @@
+package com.aemreunal.controller;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.ComponentScan;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.http.MediaType;%0Aimport org.springframework.test.context.ContextConfiguration;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0Aimport org.springframework.test.context.web.WebAppConfiguration;%0Aimport org.springframework.test.web.servlet.MockMvc;%0Aimport org.springframework.test.web.servlet.setup.MockMvcBuilders;%0Aimport org.springframework.web.context.WebApplicationContext;%0Aimport org.springframework.web.servlet.config.annotation.EnableWebMvc;%0A%0Aimport static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;%0A%0A/*%0A ***************************%0A * Copyright (c) 2014      *%0A *                         *%0A * This code belongs to:   *%0A *                         *%0A * @author Ahmet Emre %C3%9Cnal *%0A * S001974                 *%0A *                         *%0A * aemreunal@gmail.com     *%0A * emre.unal@ozu.edu.tr    *%0A *                         *%0A * aemreunal.com           *%0A ***************************%0A */%0A%0A/*%0A * From: http://blog.zenika.com/index.php?post/2013/01/15/REST-Web-Services-testing-with-Spring-MVC%0A */%0A%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@ContextConfiguration%0A@WebAppConfiguration%0Apublic class ProjectTest %7B%0A%0A    @Autowired%0A    private WebApplicationContext ctx;%0A%0A    private MockMvc mockMvc;%0A%0A    @Before%0A    public void setUp() %7B%0A        this.mockMvc = MockMvcBuilders.webAppContextSetup(ctx).build();%0A    %7D%0A%0A    @Configuration%0A    @EnableWebMvc%0A    @ComponentScan(basePackages = %7B %22com.aemreunal%22 %7D)%0A    public static class TestConfiguration %7B%0A        @Bean%0A        public ProjectController projectController() %7B%0A            return new ProjectController();%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void getProjects() throws Exception %7B%0A        Long id = (long) 1;%0A/* get(%22/contact/%7Bid%7D%22,id).accept(MediaType.APPLICATION_JSON))*/%0A        mockMvc.perform(get(%22/Project%22, id).accept(MediaType.APPLICATION_JSON))%0A               .andExpect(status().isOk())%0A               .andExpect(content().contentType(%22application/json;charset=UTF-8%22))%0A               /*.andExpect(jsonPath(%22id%22).value(id))*/;%0A    %7D%0A%7D%0A

Add REST test