### Question:
DecomposeJsonUtil implements Serializable { public static AllottedResource jsonToAllottedResource(String jsonString) throws JsonDecomposingException { try { return OBJECT_MAPPER.readValue(jsonString, AllottedResource.class); } catch (IOException e) { throw new JsonDecomposingException("Exception while converting json to allotted resource", e); } } private  DecomposeJsonUtil(); static ServiceDecomposition jsonToServiceDecomposition(String jsonString); static ServiceDecomposition jsonToServiceDecomposition(String jsonString, String serviceInstanceId); static VnfResource jsonToVnfResource(String jsonString); static NetworkResource jsonToNetworkResource(String jsonString); static AllottedResource jsonToAllottedResource(String jsonString); static ConfigResource jsonToConfigResource(String jsonString);  }### Answer:
@Test public void testJsonToAllottedResource() throws JsonDecomposingException { allottedResource = createAllottedResourceData(); AllottedResource allottedResourceObj = DecomposeJsonUtil.jsonToAllottedResource(allottedResource.toString()); assertEquals(allottedResource.getResourceId(), allottedResourceObj.getResourceId()); }
@Test public void testJsonToAllottedResource_JsonDecomposingException() throws JsonDecomposingException { expectedException.expect(JsonDecomposingException.class); configResource = createConfigResourceData(); AllottedResource allottedResourceObj = DecomposeJsonUtil.jsonToAllottedResource(configResource.toString()); }