DbConfigurationController extends AbstractOhfController { @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/xml", "application/json"}) @ResponseStatus(HttpStatus.OK) @ResponseBody public PagingWrapper<DbConfigurationParamRpc> findAll(Pageable pageable) { Assert.notNull(pageable, "pageable cannot be null"); List<DbConfigurationParam> params = paramService.findAllParameters(); Page<DbConfigurationParam> paramsPage = new PageImpl<>(pageContentList(params, pageable), pageable, params.size()); Page<DbConfigurationParamRpc> paramsRpcPage = paramsPage.map( new DbConfigurationParamRpc.DbConfigurationParamConverter()); return PagingWrapper.withMetadata(paramsRpcPage); }  @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/xml", "application/json"}) @ResponseStatus(HttpStatus.OK) @ResponseBody PagingWrapper<DbConfigurationParamRpc> findAll(Pageable pageable); @RequestMapping(value = "/{code:.+}", method = RequestMethod.GET, produces = {"application/xml", "application/json"}) @ResponseStatus(HttpStatus.OK) @ResponseBody DbConfigurationParamRpc getByCode(@PathVariable final String code); @RequestMapping(value = "/{code:.+}", method = RequestMethod.PUT, produces = {"application/xml", "application/json"}) @ResponseStatus(HttpStatus.NO_CONTENT) @ResponseBody void update(@PathVariable final String code, @RequestBody @Valid final DbConfigurationParamRpc paramRpc,
            BindingResult errors); static final String REST_URI; }
@Test public void testFindAll() throws Exception { final URIBuilder uriBuilder = createGetUrl(ROOT_URI) .addParameters(createPagePair(1, 100)); mockMvc.perform(get(toUrl(uriBuilder)) .accept(MediaType.APPLICATION_JSON) .with(SecurityMockMvcRequestPostProcessors.authentication(mockAuthentication("ADMIN")))) .andExpect(status().isOk()) .andExpect(jsonPath("paging.first", is(true))) .andExpect(jsonPath("paging.last", is(true))) .andExpect(jsonPath("paging.totalPages", is(1))) .andExpect(jsonPath("paging.number", is(1))) .andExpect(jsonPath("data[0].code", is(param.getCode()))) .andExpect(jsonPath("data[0].currentValue", is(1))) .andExpect(jsonPath("data[0].dataType", is(param.getDataType().toString()))); }