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