@Test public void given_resultwith_nbreresult_2_thenthrow_InvalidParseOperationException() throws Exception { assertEquals( MetadataJsonResponseUtils.populateJSONObjectResponse(buildResult(2), new SelectParserMultiple()).size(), 0); }
public static ArrayNode populateJSONObjectResponse(Result result, RequestParserMultiple selectRequest) throws InvalidParseOperationException { ArrayNode jsonListResponse = JsonHandler.createArrayNode(); if (result != null && result.getNbResult() > 0 && selectRequest instanceof SelectParserMultiple && result.hasFinalResult()) { LOGGER.debug("Result document: " + result.getFinal().toString()); jsonListResponse = (ArrayNode) getMetadataJsonObject(result.getListFiltered()); } LOGGER.debug("MetaDataImpl / selectUnitsByQuery /Results: " + jsonListResponse.toString()); return jsonListResponse; }
MetadataJsonResponseUtils { public static ArrayNode populateJSONObjectResponse(Result result, RequestParserMultiple selectRequest) throws InvalidParseOperationException { ArrayNode jsonListResponse = JsonHandler.createArrayNode(); if (result != null && result.getNbResult() > 0 && selectRequest instanceof SelectParserMultiple && result.hasFinalResult()) { LOGGER.debug("Result document: " + result.getFinal().toString()); jsonListResponse = (ArrayNode) getMetadataJsonObject(result.getListFiltered()); } LOGGER.debug("MetaDataImpl / selectUnitsByQuery /Results: " + jsonListResponse.toString()); return jsonListResponse; } }
MetadataJsonResponseUtils { public static ArrayNode populateJSONObjectResponse(Result result, RequestParserMultiple selectRequest) throws InvalidParseOperationException { ArrayNode jsonListResponse = JsonHandler.createArrayNode(); if (result != null && result.getNbResult() > 0 && selectRequest instanceof SelectParserMultiple && result.hasFinalResult()) { LOGGER.debug("Result document: " + result.getFinal().toString()); jsonListResponse = (ArrayNode) getMetadataJsonObject(result.getListFiltered()); } LOGGER.debug("MetaDataImpl / selectUnitsByQuery /Results: " + jsonListResponse.toString()); return jsonListResponse; } private  MetadataJsonResponseUtils(); }
MetadataJsonResponseUtils { public static ArrayNode populateJSONObjectResponse(Result result, RequestParserMultiple selectRequest) throws InvalidParseOperationException { ArrayNode jsonListResponse = JsonHandler.createArrayNode(); if (result != null && result.getNbResult() > 0 && selectRequest instanceof SelectParserMultiple && result.hasFinalResult()) { LOGGER.debug("Result document: " + result.getFinal().toString()); jsonListResponse = (ArrayNode) getMetadataJsonObject(result.getListFiltered()); } LOGGER.debug("MetaDataImpl / selectUnitsByQuery /Results: " + jsonListResponse.toString()); return jsonListResponse; } private  MetadataJsonResponseUtils(); static ArrayNode populateJSONObjectResponse(Result result, RequestParserMultiple selectRequest); static ArrayNode populateJSONObjectResponse(Result result,
        Map<String, List<String>> diff); }
MetadataJsonResponseUtils { public static ArrayNode populateJSONObjectResponse(Result result, RequestParserMultiple selectRequest) throws InvalidParseOperationException { ArrayNode jsonListResponse = JsonHandler.createArrayNode(); if (result != null && result.getNbResult() > 0 && selectRequest instanceof SelectParserMultiple && result.hasFinalResult()) { LOGGER.debug("Result document: " + result.getFinal().toString()); jsonListResponse = (ArrayNode) getMetadataJsonObject(result.getListFiltered()); } LOGGER.debug("MetaDataImpl / selectUnitsByQuery /Results: " + jsonListResponse.toString()); return jsonListResponse; } private  MetadataJsonResponseUtils(); static ArrayNode populateJSONObjectResponse(Result result, RequestParserMultiple selectRequest); static ArrayNode populateJSONObjectResponse(Result result,
        Map<String, List<String>> diff);  }