### Question:
DecomposeJsonUtil implements Serializable { public static ServiceDecomposition jsonToServiceDecomposition(String jsonString) throws JsonDecomposingException { try { ObjectMapper om = new ObjectMapper(); om.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true); om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); return om.readValue(jsonString, ServiceDecomposition.class); } catch (IOException e) { throw new JsonDecomposingException("Exception while converting json to service decomposition", 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 testJsonToServiceDecomposition_twoParams() throws JsonDecomposingException { serviceDecomposition = createServiceDecompositionData(); ServiceDecomposition serviceDecompositionObj = DecomposeJsonUtil.jsonToServiceDecomposition(serviceDecomposition.toString(), "serviceInstanceId"); assertEquals(serviceInstanceId, serviceDecompositionObj.getServiceInstance().getInstanceId()); }
@Test public void testJsonToServiceDecomposition() throws JsonDecomposingException { serviceDecomposition = createServiceDecompositionData(); ServiceDecomposition serviceDecompositionObj = DecomposeJsonUtil.jsonToServiceDecomposition(serviceDecomposition.toString()); assertEquals(serviceDecomposition.getServiceType(), serviceDecompositionObj.getServiceType()); }
@Test public void testJsonToServiceDecomposition_JsonDecomposingException() throws JsonDecomposingException { expectedException.expect(JsonDecomposingException.class); vnfResource = createVnfResourceData(); ServiceDecomposition serviceDecompositionObj = DecomposeJsonUtil.jsonToServiceDecomposition(vnfResource.toString()); }