### Question:
DecomposeJsonUtil implements Serializable { public static VnfResource jsonToVnfResource(String jsonString) throws JsonDecomposingException { try { return OBJECT_MAPPER.readValue(jsonString, VnfResource.class); } catch (IOException e) { throw new JsonDecomposingException("Exception while converting json to vnf 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 testJsonToVnfResource() throws JsonDecomposingException { vnfResource = createVnfResourceData(); VnfResource vnfResourceObj = DecomposeJsonUtil.jsonToVnfResource(vnfResource.toString()); assertEquals(vnfResource.getResourceId(), vnfResourceObj.getResourceId()); }
@Test public void testJsonToVnfResource_JsonDecomposingException() throws JsonDecomposingException { expectedException.expect(JsonDecomposingException.class); networkResource = createNetworkResourceData(); VnfResource vnfResourceObj = DecomposeJsonUtil.jsonToVnfResource(networkResource.toString()); }