class ProjectController {

    @RequestMapping(value = "/group")
    public ServiceResult<List<Project>> getGroupProjects(@RequestParam("groupId") Long groupId) throws Exception {
        return ServiceResult.success(projectDao.getProjectByGroupId(groupId));
    }

}

class ProjectControllerTest {

    @Autowired
    private WebApplicationContext webApplicationContext;
    @MockBean
    private UserLoginInterceptor userLoginInterceptor;
    @MockBean
    private CommStatusInterceptor commStatusInterceptor;
    @MockBean
    private PermissionService permissionService;
    @MockBean
    private Message message;
    @MockBean
    private ProjectDao projectDao;
    @MockBean
    private DatabaseSetDao databaseSetDao;
    @MockBean
    private ProjectService projectService;
    @MockBean
    private GroupService groupService;
    @MockBean
    private GroupDao groupDao;
    private MockMvc mockMvc;
    private String requestJson;

    @Test
    public void getGroupProjects() throws Exception {

        mockMvc.perform(MockMvcRequestBuilders.post("/project/group")
                .contentType(MediaType.APPLICATION_JSON_UTF8)
                .param("groupId","1")
                .accept(MediaType.APPLICATION_JSON_UTF8))
                .andExpect(MockMvcResultMatchers.status().isOk())
                .andDo(MockMvcResultHandlers.print());
    }

}