### Question:
SerializationUtil { public static String metadataToJSON(BriefObjectMetadata metadata, AccessGroupSet groups) { try { return jsonMapper.writeValueAsString(metadataToMap(metadata, groups)); } catch (JsonProcessingException e) { log.error("Unable to serialize object " + metadata.getId() + " to json", e); } catch (IOException e) { log.error("Unable to serialize object " + metadata.getId() + " to json", e); } return null; } private  SerializationUtil(); static String structureToJSON(HierarchicalBrowseResultResponse response, AccessGroupSet groups); static String resultsToJSON(SearchResultResponse resultResponse, AccessGroupSet groups); static List<Map<String, Object>> resultsToList(SearchResultResponse resultResponse, AccessGroupSet groups); static Map<String, Object> metadataToMap(BriefObjectMetadata metadata, AccessGroupSet groups); static String metadataToJSON(BriefObjectMetadata metadata, AccessGroupSet groups); static String objectToJSON(Object object); static void injectSettings(SearchSettings searchSettings,
            SolrSettings solrSettings, GlobalPermissionEvaluator globalPermissionEvaluator);  }### Answer:
@SuppressWarnings("unchecked") @Test public void briefMetadataToJSONTest() throws Exception { md.setTitle("Test Item"); md.setIsPart(Boolean.FALSE); md.setDatastream(DATASTREAMS); String json = SerializationUtil.metadataToJSON(md, null); Map<String, Object> jsonMap = getResultMap(json); assertEquals("uuid:test", jsonMap.get("id")); assertEquals("Test Item", jsonMap.get("title")); assertEquals(false, jsonMap.get("isPart")); assertEquals(1, ((List<String>) jsonMap.get("datastream")).size()); }