### Question:
ServiceDecomposition extends JsonWrapper implements Serializable { public ServiceDecomposition() { super(); } ServiceDecomposition();  ServiceDecomposition(String catalogRestOutput);  ServiceDecomposition(String catalogRestOutput, String serviceInstanceId);  ServiceDecomposition(JSONObject jsonServiceDecomposition, String serviceInstanceId); ModelInfo getModelInfo(); void setModelInfo(ModelInfo modelInfo); ServiceInstance getServiceInstance(); void setServiceInstance(ServiceInstance serviceInstance); Project getProject(); OwningEntity getOwningEntity(); void setProject(Project project); void setOwningEntity(OwningEntity owningEntity); List<VnfResource> getVnfResources(); void setVnfResources(List<VnfResource> vnfResources); void setConfigResources(List<ConfigResource> configResources); List<ConfigResource> getConfigResources(); void setNetworkResources(List<NetworkResource> networkResources); List<NetworkResource> getNetworkResources(); List<AllottedResource> getAllottedResources(); void setAllottedResources(List<AllottedResource> allottedResources); String getServiceType(); void setServiceType(String serviceType); String getServiceRole(); void setServiceRole(String serviceRole); Request getRequest(); void setRequest(Request request); String getCallbackURN(); void setCallbackURN(String callbackURN); String getSdncVersion(); void setSdncVersion(String sdncVersion); ServiceInfo getServiceInfo(); void setServiceInfo(ServiceInfo serviceInfo); List<ServiceProxy> getServiceProxy(); void setServiceProxy(List<ServiceProxy> serviceProxy); String getServiceCategory(); void setServiceCategory(String serviceCategory); @JsonIgnore List<Resource> getServiceResources(); @JsonIgnore String getServiceResourcesJsonString(); @JsonIgnore String getServiceNetworksJson(); @JsonIgnore String getServiceVnfsJson(); @JsonIgnore String getServiceAllottedResourcesJson(); @JsonIgnore String getServiceConfigResourcesJson(); @JsonIgnore String getVnfResource(String resourceObjectId); void addVnfResource(Resource vnfResource); void addNetworkResource(Resource networkResource); void addAllottedResource(Resource allottedResource); void addConfigResource(Resource configResource); void addResource(Resource resource); void addVnfResource(String jsonResource); void addNetworkResource(String jsonResource); void addAllottedResource(String jsonResource); void addConfigResource(String jsonResource); boolean replaceResource(Resource newResource); boolean replaceResource(String jsonString); boolean deleteResource(Resource resource); List getResourceList(Resource resource); boolean setResourceList(List<Resource> resources); @JsonIgnore Resource getServiceResource(String resourceId);  }### Answer:
@Test public void serviceDecompositionTest() throws JsonProcessingException, IOException { String catalogRestOutput = new String(Files.readAllBytes(Paths.get(RESOURCE_PATH + "ServiceDecomposition.json"))); ServiceDecomposition serviceDecomp = new ServiceDecomposition(catalogRestOutput); serviceDecomp.addVnfResource(vnfResource); serviceDecomp.addNetworkResource(networkResource); serviceDecomp.addAllottedResource(allottedResource); serviceDecomp.addConfigResource(configResource); assertThat(serviceDecomp.getServiceResource(vnfResource.getResourceId()), sameBeanAs(vnfResource)); assertThat(serviceDecomp.getServiceResource(networkResource.getResourceId()), sameBeanAs(networkResource)); assertThat(serviceDecomp.getServiceResource(allottedResource.getResourceId()), sameBeanAs(allottedResource)); assertThat(serviceDecomp.getServiceResource(configResource.getResourceId()), sameBeanAs(configResource)); VnfResource vnfResourceReplace = new VnfResource(); vnfResourceReplace.setResourceId(vnfResource.getResourceId()); vnfResourceReplace.setResourceInstanceName("vnfResourceReplaceInstanceName"); assertTrue(serviceDecomp.replaceResource(vnfResourceReplace)); assertTrue(serviceDecomp.getVnfResources().contains(vnfResourceReplace)); assertTrue(serviceDecomp.deleteResource(vnfResourceReplace)); assertFalse(serviceDecomp.deleteResource(vnfResourceReplace)); assertFalse(serviceDecomp.deleteResource(new VnfResource())); }