### Question:
ParamUtilities extends Static { public static String writeParameterDescriptorJSON(GeneralParameterDescriptor descriptor) throws JsonProcessingException { ArgumentChecks.ensureNonNull("descriptor", descriptor); final ObjectMapper mapper = new ObjectMapper(); final SimpleModule module = new SimpleModule(); module.addSerializer(GeneralParameterDescriptor.class, new ParameterDescriptorJSONSerializer()); mapper.registerModule(module); return mapper.writeValueAsString(descriptor); }  static GeneralParameterValue readParameter(final InputStream stream,
                                                      final ParameterDescriptorGroup descriptor); static GeneralParameterValue readParameter(final InputStream stream,
                                                      final GeneralParameterDescriptor descriptor); static GeneralParameterValue readParameter(final String xml,
                                                      final GeneralParameterDescriptor descriptor); static String readString(final InputStream stream); static String writeParameter(final GeneralParameterValue parameter); static String writeParameterJSON(GeneralParameterValue parameter); static GeneralParameterValue readParameterJSON(String inputJson, GeneralParameterDescriptor descriptor); static String writeParameterDescriptorJSON(GeneralParameterDescriptor descriptor);  }### Answer:
@Test public void testSerializeDescriptorJSON() throws JsonProcessingException { String jsonValue = ParamUtilities.writeParameterDescriptorJSON(DESCRITPTOR); Assert.assertNotNull(jsonValue); String expectedJSON = "{\"name\":\"group\",\"minOccurs\":1,\"maxOccurs\":1,\"descriptors\":[" + "{\"name\":\"strParam\",\"minOccurs\":1,\"maxOccurs\":1,\"class\":\"java.lang.String\",\"defaultValue\":\"Test\"}," + "{\"name\":\"boolParam\",\"minOccurs\":1,\"maxOccurs\":1,\"class\":\"java.lang.Boolean\",\"defaultValue\":true}," + "{\"name\":\"objParam\",\"minOccurs\":1,\"maxOccurs\":1,\"class\":\"org.constellation.util.ParamUtilitiesTest.SimplePojo\"}," + "{\"name\":\"intParam\",\"minOccurs\":1,\"maxOccurs\":1,\"class\":\"java.lang.Integer\",\"restriction\":{\"minValue\":0,\"maxValue\":255}}," + "{\"name\":\"enumParam\",\"minOccurs\":0,\"maxOccurs\":1,\"class\":\"org.constellation.util.ParamUtilitiesTest.SimpleEnum\",\"restriction\":{\"validValues\":[\"ONE\",\"TWO\",\"THREE\"]}}," + "{\"name\":\"subgroup\",\"minOccurs\":2,\"maxOccurs\":5,\"descriptors\":[{\"name\":\"doubleParam\",\"minOccurs\":1,\"maxOccurs\":1,\"class\":\"java.lang.Double\",\"defaultValue\":10.5}]}]}"; Assert.assertNotNull(jsonValue); Assert.assertEquals(expectedJSON, jsonValue); }