diff --git a/bpmn/so-bpmn-tasks/pom.xml b/bpmn/so-bpmn-tasks/pom.xml
index f7a4e5e..e89bbec 100644
--- a/bpmn/so-bpmn-tasks/pom.xml
+++ b/bpmn/so-bpmn-tasks/pom.xml
@@ -252,5 +252,10 @@
       <version>${grpc.version}</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.onap.so</groupId>
+      <artifactId>so-optimization-clients</artifactId>
+      <version>${project.version}</version>
+    </dependency>
   </dependencies>
 </project>
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
index f10b503..71ea9fa 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
@@ -440,7 +440,8 @@
         if (!candidates.isEmpty()) {
             for (Candidate c : candidates) {
                 org.onap.so.client.sniro.beans.Candidate can = new org.onap.so.client.sniro.beans.Candidate();
-                can.setIdentifierType(c.getIdentifierType());
+                can.setIdentifierType(
+                        org.onap.so.client.sniro.beans.CandidateType.valueOf(c.getIdentifierType().name()));
                 can.setIdentifiers(c.getIdentifiers());
                 can.setCloudOwner(c.getCloudOwner());
                 candidateList.add(can);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/OofClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/OofClient.java
deleted file mode 100644
index 8b0cf69..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/OofClient.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof;
-
-
-import org.camunda.bpm.engine.delegate.BpmnError;
-import org.onap.so.client.BaseClient;
-import org.onap.so.client.exception.BadResponseException;
-import org.onap.so.client.oof.beans.OofProperties;
-import org.onap.so.client.oof.beans.OofRequest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Component;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import java.util.LinkedHashMap;
-
-@Component
-public class OofClient {
-
-    private static final Logger logger = LoggerFactory.getLogger(OofClient.class);
-    public static final String X_MINOR_VERSION = "X-MinorVersion";
-    public static final String X_PATCH_VERSION = "X-PatchVersion";
-    public static final String X_LATEST_VERSION = "X-LatestVersion";
-
-    @Autowired
-    private OofProperties oofProperties;
-
-    @Autowired
-    private OofValidator validator;
-
-
-    /**
-     * Makes a rest call to oof to perform homing and licensing for a list of demands
-     *
-     * @param homingRequest
-     * @return
-     * @throws JsonProcessingException
-     * @throws BpmnError
-     */
-    public void postDemands(OofRequest homingRequest) throws BadResponseException, JsonProcessingException {
-        logger.trace("Started oof Client Post Demands");
-        String url = oofProperties.getHost() + oofProperties.getUri();
-        logger.debug("Post demands url: " + url);
-        logger.debug("Post demands payload: " + homingRequest.toJsonString());
-
-        HttpHeaders header = new HttpHeaders();
-        header.setContentType(MediaType.APPLICATION_JSON);
-        header.set(HttpHeaders.AUTHORIZATION, oofProperties.getHeaders().get("auth"));
-        header.set(X_PATCH_VERSION, oofProperties.getHeaders().get("patchVersion"));
-        header.set(X_MINOR_VERSION, oofProperties.getHeaders().get("minorVersion"));
-        header.set(X_LATEST_VERSION, oofProperties.getHeaders().get("latestVersion"));
-        BaseClient<String, LinkedHashMap<?, ?>> baseClient = new BaseClient<>();
-
-        baseClient.setTargetUrl(url);
-        baseClient.setHttpHeader(header);
-
-        LinkedHashMap<?, ?> response =
-                baseClient.post(homingRequest.toJsonString(), new ParameterizedTypeReference<LinkedHashMap<?, ?>>() {});
-        validator.validateDemandsResponse(response);
-        logger.trace("Completed OOF Client Post Demands");
-    }
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/OofValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/OofValidator.java
deleted file mode 100644
index abbf52e..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/OofValidator.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof;
-
-
-import org.json.JSONObject;
-import org.onap.so.client.exception.BadResponseException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-import java.util.LinkedHashMap;
-import static org.apache.commons.lang.StringUtils.isNotBlank;
-
-
-@Component
-public class OofValidator {
-
-    private static final Logger logger = LoggerFactory.getLogger(OofValidator.class);
-
-    /**
-     * Validates the synchronous homing response from oof
-     *
-     * @throws BadResponseException
-     */
-    public void validateDemandsResponse(LinkedHashMap<?, ?> response) throws BadResponseException {
-        logger.debug("Validating oofs synchronous response");
-        if (!response.isEmpty()) {
-            JSONObject jsonResponse = new JSONObject(response);
-            if (jsonResponse.has("requestStatus")) {
-                String status = jsonResponse.getString("requestStatus");
-                if (status.equals("accepted")) {
-                    logger.debug("oofs synchronous response indicates accepted");
-                } else {
-                    String message = jsonResponse.getString("statusMessage");
-                    if (isNotBlank(message)) {
-                        logger.debug("oofs response indicates failed: " + message);
-                    } else {
-                        logger.debug("oofs response indicates failed: no status message provided");
-                        message = "error message not provided";
-                    }
-                    throw new BadResponseException("oofs synchronous response indicates failed: " + message);
-                }
-            } else {
-                logger.debug("oofs synchronous response does not contain: request status");
-                throw new BadResponseException("oofs synchronous response does not contain: request status");
-            }
-        } else {
-            logger.debug("oofs synchronous response is empty");
-            throw new BadResponseException("oofs synchronous response i is empty");
-        }
-    }
-
-    /**
-     * Validates the asynchronous/callback response from oof which contains the homing and licensing solutions
-     *
-     * @throws BadResponseException
-     */
-    public void validateSolution(String response) throws BadResponseException {
-        logger.debug("Validating oofs asynchronous callback response");
-        if (isNotBlank(response)) {
-            JSONObject jsonResponse = new JSONObject(response);
-            if (!jsonResponse.has("serviceException")) {
-                logger.debug("oofs asynchronous response is valid");
-            } else {
-                String message = jsonResponse.getJSONObject("serviceException").getString("text");
-                if (isNotBlank(message)) {
-                    logger.debug("oofs response contains a service exception: " + message);
-                } else {
-                    logger.debug("oofs response contains a service exception: no service exception text provided");
-                    message = "error message not provided";
-                }
-                throw new BadResponseException("oofs asynchronous response contains a service exception: " + message);
-            }
-        } else {
-            logger.debug("oofs asynchronous response is empty");
-            throw new BadResponseException("oofs asynchronous response is empty");
-        }
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/LicenseDemand.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/LicenseDemand.java
deleted file mode 100644
index e64a545..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/LicenseDemand.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2019 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
-import java.io.Serializable;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"resourceModuleName", "serviceResourceId", "tenantId", "resourceModelInfo"})
-@JsonRootName("licenseDemand")
-public class LicenseDemand implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-    @JsonProperty("resourceModuleName")
-    private String resourceModuleName;
-    @JsonProperty("serviceResourceId")
-    private String serviceResourceId;
-    @JsonProperty("tenantId")
-    private String tenantId;
-    @JsonProperty("resourceModelInfo")
-    private ResourceModelInfo resourceModelInfo;
-
-    @JsonProperty("resourceModuleName")
-    public String getResourceModuleName() {
-        return resourceModuleName;
-    }
-
-    @JsonProperty("resourceModuleName")
-    public void setResourceModuleName(String resourceModuleName) {
-        this.resourceModuleName = resourceModuleName;
-    }
-
-    @JsonProperty("serviceResourceId")
-    public String getServiceResourceId() {
-        return serviceResourceId;
-    }
-
-    @JsonProperty("serviceResourceId")
-    public void setServiceResourceId(String serviceResourceId) {
-        this.serviceResourceId = serviceResourceId;
-    }
-
-    @JsonProperty("tenantId")
-    public String getTenantId() {
-        return tenantId;
-    }
-
-    @JsonProperty("tenantId")
-    public void setTenantId(String tenantId) {
-        this.tenantId = tenantId;
-    }
-
-    @JsonProperty("resourceModelInfo")
-    public ResourceModelInfo getResourceModelInfo() {
-        return resourceModelInfo;
-    }
-
-    @JsonProperty("resourceModelInfo")
-    public void setResourceModelInfo(ResourceModelInfo resourceModelInfo) {
-        this.resourceModelInfo = resourceModelInfo;
-    }
-
-    public void setResourceModelInfo(ModelInfo modelInfo) {
-        ResourceModelInfo localResourceModelInfo = new ResourceModelInfo();
-        localResourceModelInfo.setModelVersionId(modelInfo.getModelVersionId());
-        localResourceModelInfo.setModelVersionId(modelInfo.getModelVersionId());
-        localResourceModelInfo.setModelVersion(modelInfo.getModelVersion());
-        localResourceModelInfo.setModelName(modelInfo.getModelName());
-        localResourceModelInfo.setModelType(modelInfo.getModelType());
-        localResourceModelInfo.setModelInvariantId(modelInfo.getModelInvariantId());
-        localResourceModelInfo.setModelCustomizationName(modelInfo.getModelCustomizationName());
-        this.resourceModelInfo = localResourceModelInfo;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/LicenseInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/LicenseInfo.java
deleted file mode 100644
index 74ff933..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/LicenseInfo.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2019 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonRootName;
-import java.io.Serializable;
-import java.util.ArrayList;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonRootName("licenseInfo")
-public class LicenseInfo implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-    @JsonProperty("licenseDemands")
-    private ArrayList<LicenseDemand> licenseDemands = new ArrayList<>();
-
-
-    @JsonProperty("licenseDemands")
-    public ArrayList<LicenseDemand> getLicenseDemands() {
-        return licenseDemands;
-    }
-
-    @JsonProperty("licenseDemands")
-    public void setLicenseDemands(ArrayList<LicenseDemand> licenseDemands) {
-        this.licenseDemands = licenseDemands;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/ModelInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/ModelInfo.java
deleted file mode 100644
index 433de22..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/ModelInfo.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
-import java.io.Serializable;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"modelType", "modelInvariantId", "modelVersionId", "modelName", "modelVersion",
-        "modelCustomizationName"})
-@JsonRootName("modelInfo")
-public class ModelInfo implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-    @JsonProperty("modelType")
-    private String modelType;
-    @JsonProperty("modelInvariantId")
-    private String modelInvariantId;
-    @JsonProperty("modelVersionId")
-    private String modelVersionId;
-    @JsonProperty("modelName")
-    private String modelName;
-    @JsonProperty("modelVersion")
-    private String modelVersion;
-    @JsonProperty("modelCustomizationName")
-    private String modelCustomizationName;
-
-    @JsonProperty("modelType")
-    public String getModelType() {
-        return modelType;
-    }
-
-    @JsonProperty("modelType")
-    public void setModelType(String modelType) {
-        this.modelType = modelType;
-    }
-
-    @JsonProperty("modelInvariantId")
-    public String getModelInvariantId() {
-        return modelInvariantId;
-    }
-
-    @JsonProperty("modelInvariantId")
-    public void setModelInvariantId(String modelInvariantId) {
-        this.modelInvariantId = modelInvariantId;
-    }
-
-    @JsonProperty("modelVersionId")
-    public String getModelVersionId() {
-        return modelVersionId;
-    }
-
-    @JsonProperty("modelVersionId")
-    public void setModelVersionId(String modelVersionId) {
-        this.modelVersionId = modelVersionId;
-    }
-
-    @JsonProperty("modelName")
-    public String getModelName() {
-        return modelName;
-    }
-
-    @JsonProperty("modelName")
-    public void setModelName(String modelName) {
-        this.modelName = modelName;
-    }
-
-    @JsonProperty("modelVersion")
-    public String getModelVersion() {
-        return modelVersion;
-    }
-
-    @JsonProperty("modelVersion")
-    public void setModelVersion(String modelVersion) {
-        this.modelVersion = modelVersion;
-    }
-
-    @JsonProperty("modelCustomizationName")
-    public String getModelCustomizationName() {
-        return modelCustomizationName;
-    }
-
-    @JsonProperty("modelCustomizationName")
-    public void setModelCustomizationName(String modelCustomizationName) {
-        this.modelCustomizationName = modelCustomizationName;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/OofProperties.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/OofProperties.java
deleted file mode 100644
index 84e29b6..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/OofProperties.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
-import java.util.Map;
-
-@Configuration
-@ConfigurationProperties(prefix = "oof")
-public class OofProperties {
-
-    private String host;
-    private String uri;
-
-    private Map<String, String> headers;
-
-
-    public String getHost() {
-        return host;
-    }
-
-    public void setHost(String host) {
-        this.host = host;
-    }
-
-    public String getUri() {
-        return uri;
-    }
-
-    public void setUri(String uri) {
-        this.uri = uri;
-    }
-
-    public Map<String, String> getHeaders() {
-        return headers;
-    }
-
-    public void setHeaders(Map<String, String> headers) {
-        this.headers = headers;
-    }
-
-
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/OofRequest.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/OofRequest.java
deleted file mode 100644
index f889624..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/OofRequest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.ObjectWriter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import java.io.Serializable;
-
-
-public class OofRequest implements Serializable {
-
-    private static final long serialVersionUID = -1541132882892163132L;
-    private static final Logger logger = LoggerFactory.getLogger(OofRequest.class);
-
-
-    @JsonProperty("requestInfo")
-    private RequestInfo requestInformation;
-
-    @JsonProperty("serviceInfo")
-    private ServiceInfo serviceInformation;
-
-    @JsonProperty("placementInfo")
-    private PlacementInfo placementInformation;
-
-    @JsonProperty("licenseInfo")
-    private LicenseInfo licenseInformation;
-
-
-    public RequestInfo getRequestInformation() {
-        return requestInformation;
-    }
-
-    public void setRequestInformation(RequestInfo requestInformation) {
-        this.requestInformation = requestInformation;
-    }
-
-    public ServiceInfo getServiceInformation() {
-        return serviceInformation;
-    }
-
-    public void setServiceInformation(ServiceInfo serviceInformation) {
-        this.serviceInformation = serviceInformation;
-    }
-
-    public PlacementInfo getPlacementInformation() {
-        return placementInformation;
-    }
-
-    public void setPlacementInformation(PlacementInfo placementInformation) {
-        this.placementInformation = placementInformation;
-    }
-
-    public LicenseInfo getLicenseInformation() {
-        return licenseInformation;
-    }
-
-    public void setLicenseInformation(LicenseInfo licenseInformation) {
-        this.licenseInformation = licenseInformation;
-    }
-
-
-    @JsonInclude(Include.NON_NULL)
-    public String toJsonString() {
-        String json = "";
-        ObjectMapper mapper = new ObjectMapper();
-        mapper.setSerializationInclusion(Include.NON_NULL);
-        ObjectWriter ow = mapper.writer().withDefaultPrettyPrinter();
-        try {
-            json = ow.writeValueAsString(this);
-        } catch (Exception e) {
-            logger.error("Unable to convert oofRequest to string", e);
-        }
-        return json.replaceAll("\\\\", "");
-    }
-
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/OofRequestParameters.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/OofRequestParameters.java
deleted file mode 100644
index 6c9e45c..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/OofRequestParameters.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
-import java.io.Serializable;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"customerLatitude", "customerLongitude", "customerName"})
-@JsonRootName("requestParameters")
-public class OofRequestParameters implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-
-    @JsonProperty("customerLatitude")
-    private String customerLatitude;
-    @JsonProperty("customerLongitude")
-    private String customerLongitude;
-    @JsonProperty("customerName")
-    private String customerName;
-
-    @JsonProperty("customerLatitude")
-    public String getCustomerLatitude() {
-        return customerLatitude;
-    }
-
-    @JsonProperty("customerLatitude")
-    public void setCustomerLatitude(String customerLatitude) {
-        this.customerLatitude = customerLatitude;
-    }
-
-    @JsonProperty("customerLongitude")
-    public String getCustomerLongitude() {
-        return customerLongitude;
-    }
-
-    @JsonProperty("customerLongitude")
-    public void setCustomerLongitude(String customerLongitude) {
-        this.customerLongitude = customerLongitude;
-    }
-
-    @JsonProperty("customerName")
-    public String getCustomerName() {
-        return customerName;
-    }
-
-    @JsonProperty("customerName")
-    public void setCustomerName(String customerName) {
-        this.customerName = customerName;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/PlacementDemand.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/PlacementDemand.java
deleted file mode 100644
index 631b370..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/PlacementDemand.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
-import java.io.Serializable;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"resourceModuleName", "serviceResourceId", "tenantId", "resourceModelInfo"})
-@JsonRootName("placementDemand")
-public class PlacementDemand implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-    @JsonProperty("resourceModuleName")
-    private String resourceModuleName;
-    @JsonProperty("serviceResourceId")
-    private String serviceResourceId;
-    @JsonProperty("tenantId")
-    private String tenantId;
-    @JsonProperty("resourceModelInfo")
-    private ResourceModelInfo resourceModelInfo;
-
-    @JsonProperty("resourceModuleName")
-    public String getResourceModuleName() {
-        return resourceModuleName;
-    }
-
-    @JsonProperty("resourceModuleName")
-    public void setResourceModuleName(String resourceModuleName) {
-        this.resourceModuleName = resourceModuleName;
-    }
-
-    @JsonProperty("serviceResourceId")
-    public String getServiceResourceId() {
-        return serviceResourceId;
-    }
-
-    @JsonProperty("serviceResourceId")
-    public void setServiceResourceId(String serviceResourceId) {
-        this.serviceResourceId = serviceResourceId;
-    }
-
-    @JsonProperty("tenantId")
-    public String getTenantId() {
-        return tenantId;
-    }
-
-    @JsonProperty("tenantId")
-    public void setTenantId(String tenantId) {
-        this.tenantId = tenantId;
-    }
-
-    @JsonProperty("resourceModelInfo")
-    public ResourceModelInfo getResourceModelInfo() {
-        return resourceModelInfo;
-    }
-
-    @JsonProperty("resourceModelInfo")
-    public void setResourceModelInfo(ResourceModelInfo resourceModelInfo) {
-        this.resourceModelInfo = resourceModelInfo;
-    }
-
-    public void setResourceModelInfo(ModelInfo modelInfo) {
-        ResourceModelInfo localResourceModelInfo = new ResourceModelInfo();
-        localResourceModelInfo.setModelVersionId(modelInfo.getModelVersionId());
-        localResourceModelInfo.setModelVersionId(modelInfo.getModelVersionId());
-        localResourceModelInfo.setModelVersion(modelInfo.getModelVersion());
-        localResourceModelInfo.setModelName(modelInfo.getModelName());
-        localResourceModelInfo.setModelType(modelInfo.getModelType());
-        localResourceModelInfo.setModelInvariantId(modelInfo.getModelInvariantId());
-        localResourceModelInfo.setModelCustomizationName(modelInfo.getModelCustomizationName());
-        this.resourceModelInfo = localResourceModelInfo;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/PlacementInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/PlacementInfo.java
deleted file mode 100644
index 7519e8c..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/PlacementInfo.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"requestParameters", "subscriberInfo", "placementDemands"})
-@JsonRootName("placementInfo")
-public class PlacementInfo implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-    @JsonProperty("requestParameters")
-    private OofRequestParameters requestParameters;
-    @JsonProperty("subscriberInfo")
-    private SubscriberInfo subscriberInfo;
-    @JsonProperty("placementDemands")
-    private ArrayList<PlacementDemand> placementDemands = new ArrayList<>();
-
-    @JsonProperty("requestParameters")
-    public OofRequestParameters getRequestParameters() {
-        return requestParameters;
-    }
-
-    @JsonProperty("requestParameters")
-    public void setRequestParameters(OofRequestParameters requestParameters) {
-        this.requestParameters = requestParameters;
-    }
-
-    @JsonProperty("subscriberInfo")
-    public SubscriberInfo getSubscriberInfo() {
-        return subscriberInfo;
-    }
-
-    @JsonProperty("subscriberInfo")
-    public void setSubscriberInfo(SubscriberInfo subscriberInfo) {
-        this.subscriberInfo = subscriberInfo;
-    }
-
-    @JsonProperty("placementDemands")
-    public ArrayList<PlacementDemand> getPlacementDemands() {
-        return placementDemands;
-    }
-
-    @JsonProperty("placementDemands")
-    public void setPlacementDemands(ArrayList<PlacementDemand> placementDemands) {
-        this.placementDemands = placementDemands;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/RequestInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/RequestInfo.java
deleted file mode 100644
index 0132ed5..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/RequestInfo.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import java.io.Serializable;
-import java.util.List;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"transactionId", "requestId", "callbackUrl", "sourceId", "requestType", "numSolutions",
-        "optimizers", "timeout"})
-@JsonRootName("requestInfo")
-public class RequestInfo implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-    @JsonProperty("transactionId")
-    private String transactionId;
-    @JsonProperty("requestId")
-    private String requestId;
-    @JsonProperty("callbackUrl")
-    private String callbackUrl;
-    @JsonProperty("sourceId")
-    private String sourceId;
-    @JsonProperty("requestType")
-    private String requestType;
-    @JsonProperty("numSolutions")
-    private Integer numSolutions;
-    @JsonProperty("optimizers")
-    private List<String> optimizers = null;
-    @JsonProperty("timeout")
-    private Long timeout;
-
-    @JsonProperty("transactionId")
-    public String getTransactionId() {
-        return transactionId;
-    }
-
-    @JsonProperty("transactionId")
-    public void setTransactionId(String transactionId) {
-        this.transactionId = transactionId;
-    }
-
-    @JsonProperty("requestId")
-    public String getRequestId() {
-        return requestId;
-    }
-
-    @JsonProperty("requestId")
-    public void setRequestId(String requestId) {
-        this.requestId = requestId;
-    }
-
-    @JsonProperty("callbackUrl")
-    public String getCallbackUrl() {
-        return callbackUrl;
-    }
-
-    @JsonProperty("callbackUrl")
-    public void setCallbackUrl(String callbackUrl) {
-        this.callbackUrl = callbackUrl;
-    }
-
-    @JsonProperty("sourceId")
-    public String getSourceId() {
-        return sourceId;
-    }
-
-    @JsonProperty("sourceId")
-    public void setSourceId(String sourceId) {
-        this.sourceId = sourceId;
-    }
-
-    @JsonProperty("requestType")
-    public String getRequestType() {
-        return requestType;
-    }
-
-    @JsonProperty("requestType")
-    public void setRequestType(String requestType) {
-        this.requestType = requestType;
-    }
-
-    @JsonProperty("numSolutions")
-    public Integer getNumSolutions() {
-        return numSolutions;
-    }
-
-    @JsonProperty("numSolutions")
-    public void setNumSolutions(Integer numSolutions) {
-        this.numSolutions = numSolutions;
-    }
-
-    @JsonProperty("optimizers")
-    public List<String> getOptimizers() {
-        return optimizers;
-    }
-
-    @JsonProperty("optimizers")
-    public void setOptimizers(List<String> optimizers) {
-        this.optimizers = optimizers;
-    }
-
-    @JsonProperty("timeout")
-    public Long getTimeout() {
-        return timeout;
-    }
-
-    @JsonProperty("timeout")
-    public void setTimeout(Long timeout) {
-        this.timeout = timeout;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/Resource.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/Resource.java
deleted file mode 100644
index 8d44c63..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/Resource.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.io.Serializable;
-
-public class Resource implements Serializable {
-
-    private static final long serialVersionUID = 5949861520571440421L;
-
-    @JsonProperty("service-resource-id")
-    private String serviceResourceId;
-    @JsonProperty("status")
-    private String status;
-
-
-    public String getServiceResourceId() {
-        return serviceResourceId;
-    }
-
-    public void setServiceResourceId(String serviceResourceId) {
-        this.serviceResourceId = serviceResourceId;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/ResourceModelInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/ResourceModelInfo.java
deleted file mode 100644
index 9d03525..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/ResourceModelInfo.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonRootName;
-import java.io.Serializable;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonRootName("resourceModelInfo")
-public class ResourceModelInfo extends ModelInfo implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-    @JsonProperty("modelInvariantId")
-    private String modelInvariantId;
-    @JsonProperty("modelVersionId")
-    private String modelVersionId;
-    @JsonProperty("modelName")
-    private String modelName;
-    @JsonProperty("modelType")
-    private String modelType;
-    @JsonProperty("modelVersion")
-    private String modelVersion;
-    @JsonProperty("modelCustomizationName")
-    private String modelCustomizationName;
-
-    @JsonProperty("modelInvariantId")
-    public String getModelInvariantId() {
-        return modelInvariantId;
-    }
-
-    @JsonProperty("modelInvariantId")
-    public void setModelInvariantId(String modelInvariantId) {
-        this.modelInvariantId = modelInvariantId;
-    }
-
-    @JsonProperty("modelVersionId")
-    public String getModelVersionId() {
-        return modelVersionId;
-    }
-
-    @JsonProperty("modelVersionId")
-    public void setModelVersionId(String modelVersionId) {
-        this.modelVersionId = modelVersionId;
-    }
-
-    @JsonProperty("modelName")
-    public String getModelName() {
-        return modelName;
-    }
-
-    @JsonProperty("modelName")
-    public void setModelName(String modelName) {
-        this.modelName = modelName;
-    }
-
-    @JsonProperty("modelType")
-    public String getModelType() {
-        return modelType;
-    }
-
-    @JsonProperty("modelType")
-    public void setModelType(String modelType) {
-        this.modelType = modelType;
-    }
-
-    @JsonProperty("modelVersion")
-    public String getModelVersion() {
-        return modelVersion;
-    }
-
-    @JsonProperty("modelVersion")
-    public void setModelVersion(String modelVersion) {
-        this.modelVersion = modelVersion;
-    }
-
-    @JsonProperty("modelCustomizationName")
-    public String getModelCustomizationName() {
-        return modelCustomizationName;
-    }
-
-    @JsonProperty("modelCustomizationName")
-    public void setModelCustomizationName(String modelCustomizationName) {
-        this.modelCustomizationName = modelCustomizationName;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/ServiceInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/ServiceInfo.java
deleted file mode 100644
index db0e2ac..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/ServiceInfo.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
-import java.io.Serializable;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"serviceInstanceId", "serviceName", "modelInfo"})
-@JsonRootName("serviceInfo")
-public class ServiceInfo implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-    @JsonProperty("serviceInstanceId")
-    private String serviceInstanceId;
-    @JsonProperty("serviceName")
-    private String serviceName;
-    @JsonProperty("modelInfo")
-    private ModelInfo modelInfo;
-
-    @JsonProperty("serviceInstanceId")
-    public String getServiceInstanceId() {
-        return serviceInstanceId;
-    }
-
-    @JsonProperty("serviceInstanceId")
-    public void setServiceInstanceId(String serviceInstanceId) {
-        this.serviceInstanceId = serviceInstanceId;
-    }
-
-    @JsonProperty("serviceName")
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    @JsonProperty("serviceName")
-    public void setServiceName(String serviceName) {
-        this.serviceName = serviceName;
-    }
-
-    @JsonProperty("modelInfo")
-    public ModelInfo getModelInfo() {
-        return modelInfo;
-    }
-
-    @JsonProperty("modelInfo")
-    public void setModelInfo(ModelInfo modelInfo) {
-        this.modelInfo = modelInfo;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/SubscriberInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/SubscriberInfo.java
deleted file mode 100644
index 8fef4c4..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/oof/beans/SubscriberInfo.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp.  All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof.beans;
-
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
-import java.io.Serializable;
-
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonPropertyOrder({"globalSubscriberId", "subscriberName", "subscriberCommonSiteId"})
-@JsonRootName("subscriberInfo")
-public class SubscriberInfo implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-    @JsonProperty("globalSubscriberId")
-    private String globalSubscriberId;
-    @JsonProperty("subscriberName")
-    private String subscriberName;
-    @JsonProperty("subscriberCommonSiteId")
-    private String subscriberCommonSiteId;
-
-    @JsonProperty("globalSubscriberId")
-    public String getGlobalSubscriberId() {
-        return globalSubscriberId;
-    }
-
-    @JsonProperty("globalSubscriberId")
-    public void setGlobalSubscriberId(String globalSubscriberId) {
-        this.globalSubscriberId = globalSubscriberId;
-    }
-
-    @JsonProperty("subscriberName")
-    public String getSubscriberName() {
-        return subscriberName;
-    }
-
-    @JsonProperty("subscriberName")
-    public void setSubscriberName(String subscriberName) {
-        this.subscriberName = subscriberName;
-    }
-
-    @JsonProperty("subscriberCommonSiteId")
-    public String getSubscriberCommonSiteId() {
-        return subscriberCommonSiteId;
-    }
-
-    @JsonProperty("subscriberCommonSiteId")
-    public void setSubscriberCommonSiteId(String subscriberCommonSiteId) {
-        this.subscriberCommonSiteId = subscriberCommonSiteId;
-    }
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java
deleted file mode 100644
index c63cbc0..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroClient.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro;
-
-import java.util.LinkedHashMap;
-import org.camunda.bpm.engine.delegate.BpmnError;
-import org.onap.so.bpmn.core.UrnPropertiesReader;
-import org.onap.so.client.BaseClient;
-import org.onap.so.client.exception.BadResponseException;
-import org.onap.so.client.sniro.beans.ManagerProperties;
-import org.onap.so.client.sniro.beans.SniroConductorRequest;
-import org.onap.so.client.sniro.beans.SniroManagerRequest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Component;
-
-
-@Component
-public class SniroClient {
-
-    private static final Logger logger = LoggerFactory.getLogger(SniroClient.class);
-
-    @Autowired
-    private ManagerProperties managerProperties;
-
-    @Autowired
-    private SniroValidator validator;
-
-
-    /**
-     * Makes a rest call to sniro manager to perform homing and licensing for a list of demands
-     *
-     * @param homingRequest
-     * @return
-     * @throws BadResponseException
-     * @throws BpmnError
-     */
-    public void postDemands(SniroManagerRequest homingRequest) throws BadResponseException {
-        logger.trace("Started Sniro Client Post Demands");
-        String url = managerProperties.getHost() + managerProperties.getUri().get("v2");
-        logger.debug("Post demands url: {}", url);
-        logger.debug("Post demands payload: {}", homingRequest.toJsonString());
-
-        HttpHeaders header = new HttpHeaders();
-        header.setContentType(MediaType.APPLICATION_JSON);
-        header.set("Authorization", managerProperties.getHeaders().get("auth"));
-        header.set("X-patchVersion", managerProperties.getHeaders().get("patchVersion"));
-        header.set("X-minorVersion", managerProperties.getHeaders().get("minorVersion"));
-        header.set("X-latestVersion", managerProperties.getHeaders().get("latestVersion"));
-        BaseClient<String, LinkedHashMap<String, Object>> baseClient = new BaseClient<>();
-
-        baseClient.setTargetUrl(url);
-        baseClient.setHttpHeader(header);
-
-        LinkedHashMap<String, Object> response = baseClient.post(homingRequest.toJsonString(),
-                new ParameterizedTypeReference<LinkedHashMap<String, Object>>() {});
-        validator.validateDemandsResponse(response);
-        logger.trace("Completed Sniro Client Post Demands");
-    }
-
-    /**
-     * Makes a rest call to sniro conductor to notify them of successful or unsuccessful vnf creation for previously
-     * homed resources
-     *
-     * TODO Temporarily being used in groovy therefore can not utilize autowire. Once java "release" subflow is
-     * developed it will be refactored to use autowire.
-     *
-     * @param releaseRequest
-     * @return
-     * @throws BadResponseException
-     */
-    public void postRelease(SniroConductorRequest releaseRequest) throws BadResponseException {
-        logger.trace("Started Sniro Client Post Release");
-        String url = UrnPropertiesReader.getVariable("sniro.conductor.host")
-                + UrnPropertiesReader.getVariable("sniro.conductor.uri");
-        logger.debug("Post release url: {}", url);
-        logger.debug("Post release payload: {}", releaseRequest.toJsonString());
-
-        HttpHeaders header = new HttpHeaders();
-        header.setContentType(MediaType.APPLICATION_JSON);
-        header.set("Authorization", UrnPropertiesReader.getVariable("sniro.conductor.headers.auth"));
-        BaseClient<String, LinkedHashMap<String, Object>> baseClient = new BaseClient<>();
-
-        baseClient.setTargetUrl(url);
-        baseClient.setHttpHeader(header);
-
-        LinkedHashMap<String, Object> response = baseClient.post(releaseRequest.toJsonString(),
-                new ParameterizedTypeReference<LinkedHashMap<String, Object>>() {});
-        SniroValidator v = new SniroValidator();
-        v.validateReleaseResponse(response);
-        logger.trace("Completed Sniro Client Post Release");
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroValidator.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroValidator.java
deleted file mode 100644
index eb73001..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/SniroValidator.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro;
-
-
-import static org.apache.commons.lang.StringUtils.*;
-import java.util.LinkedHashMap;
-import org.json.JSONObject;
-import org.onap.so.client.exception.BadResponseException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-
-
-@Component
-public class SniroValidator {
-
-    private static final Logger logger = LoggerFactory.getLogger(SniroValidator.class);
-
-    /**
-     * Validates the synchronous homing response from sniro manager
-     *
-     * @throws BadResponseException
-     */
-    public void validateDemandsResponse(LinkedHashMap<String, Object> response) throws BadResponseException {
-        logger.debug("Validating Sniro Managers synchronous response");
-        if (!response.isEmpty()) {
-            JSONObject jsonResponse = new JSONObject(response);
-            if (jsonResponse.has("requestStatus")) {
-                String status = jsonResponse.getString("requestStatus");
-                if ("accepted".equals(status)) {
-                    logger.debug("Sniro Managers synchronous response indicates accepted");
-                } else {
-                    String message = jsonResponse.getString("statusMessage");
-                    if (isNotBlank(message)) {
-                        logger.debug("Sniro Managers response indicates failed: " + message);
-                    } else {
-                        logger.debug("Sniro Managers response indicates failed: no status message provided");
-                        message = "error message not provided";
-                    }
-                    throw new BadResponseException("Sniro Managers synchronous response indicates failed: " + message);
-                }
-            } else {
-                logger.debug("Sniro Managers synchronous response does not contain: request status");
-                throw new BadResponseException("Sniro Managers synchronous response does not contain: request status");
-            }
-        } else {
-            logger.debug("Sniro Managers synchronous response is empty");
-            throw new BadResponseException("Sniro Managers synchronous response i is empty");
-        }
-    }
-
-    /**
-     * Validates the asynchronous/callback response from sniro manager which contains the homing and licensing solutions
-     *
-     * @throws BadResponseException
-     */
-    public static void validateSolution(String response) throws BadResponseException {
-        logger.debug("Validating Sniro Managers asynchronous callback response");
-        if (isNotBlank(response)) {
-            JSONObject jsonResponse = new JSONObject(response);
-            if (!jsonResponse.has("serviceException")) {
-                logger.debug("Sniro Managers asynchronous response is valid");
-            } else {
-                String message = jsonResponse.getJSONObject("serviceException").getString("text");
-                if (isNotBlank(message)) {
-                    logger.debug("Sniro Managers response contains a service exception: " + message);
-                } else {
-                    logger.debug(
-                            "Sniro Managers response contains a service exception: no service exception text provided");
-                    message = "error message not provided";
-                }
-                throw new BadResponseException(
-                        "Sniro Managers asynchronous response contains a service exception: " + message);
-            }
-        } else {
-            logger.debug("Sniro Managers asynchronous response is empty");
-            throw new BadResponseException("Sniro Managers asynchronous response is empty");
-        }
-    }
-
-
-    /**
-     * Validates the release response from sniro conductor
-     *
-     * @throws BadResponseException
-     */
-    public void validateReleaseResponse(LinkedHashMap<String, Object> response) throws BadResponseException {
-        logger.debug("Validating Sniro Conductors response");
-        if (!response.isEmpty()) {
-            String status = (String) response.get("status");
-            if (isNotBlank(status)) {
-                if ("success".equals(status)) {
-                    logger.debug("Sniro Conductors synchronous response indicates success");
-                } else {
-                    String message = (String) response.get("message");
-                    if (isNotBlank(message)) {
-                        logger.debug("Sniro Conductors response indicates failed: " + message);
-                    } else {
-                        logger.debug("Sniro Conductors response indicates failed: error message not provided");
-                        message = "error message not provided";
-                    }
-                    throw new BadResponseException(
-                            "Sniro Conductors synchronous response indicates failed: " + message);
-                }
-            } else {
-                logger.debug("Sniro Managers Conductors response does not contain: status");
-                throw new BadResponseException("Sniro Conductors synchronous response does not contain: status");
-            }
-        } else {
-            logger.debug("Sniro Conductors response is empty");
-            throw new BadResponseException("Sniro Conductors response is empty");
-        }
-
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java
deleted file mode 100644
index 3127275..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import java.util.List;
-import org.onap.so.bpmn.servicedecomposition.homingobjects.CandidateType;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class Candidate implements Serializable {
-
-    private static final long serialVersionUID = -5474502255533410907L;
-
-    @JsonProperty("identifierType")
-    private CandidateType identifierType;
-    @JsonProperty("identifiers")
-    private List<String> identifiers;
-    @JsonProperty("cloudOwner")
-    private String cloudOwner;
-
-    public Candidate() {}
-
-    public Candidate(CandidateType identifierType, List<String> identifiers, String cloudOwner) {
-        this.identifierType = identifierType;
-        this.identifiers = identifiers;
-        this.cloudOwner = cloudOwner;
-    }
-
-    public CandidateType getIdentifierType() {
-        return identifierType;
-    }
-
-    public void setIdentifierType(CandidateType identifierType) {
-        this.identifierType = identifierType;
-    }
-
-    public List<String> getIdentifiers() {
-        return identifiers;
-    }
-
-    public void setIdentifiers(List<String> identifiers) {
-        this.identifiers = identifiers;
-    }
-
-    public String getCloudOwner() {
-        return cloudOwner;
-    }
-
-    public void setCloudOwner(String cloudOwner) {
-        this.cloudOwner = cloudOwner;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ConductorProperties.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ConductorProperties.java
deleted file mode 100644
index 9ac8727..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ConductorProperties.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.util.Map;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-@ConfigurationProperties(prefix = "sniro.conductor")
-public class ConductorProperties {
-
-    private String host;
-    private String uri;
-
-    private Map<String, String> headers;
-
-
-    public String getHost() {
-        return host;
-    }
-
-    public void setHost(String host) {
-        this.host = host;
-    }
-
-    public String getUri() {
-        return uri;
-    }
-
-    public void setUri(String uri) {
-        this.uri = uri;
-    }
-
-    public Map<String, String> getHeaders() {
-        return headers;
-    }
-
-    public void setHeaders(Map<String, String> headers) {
-        this.headers = headers;
-    }
-
-
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Demand.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Demand.java
deleted file mode 100644
index 0cc9935..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Demand.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import java.util.List;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class Demand implements Serializable {
-
-    private static final long serialVersionUID = 5676094538091859816L;
-
-    @JsonProperty("serviceResourceId")
-    private String serviceResourceId;
-    @JsonProperty("resourceModuleName")
-    private String resourceModuleName;
-    @JsonProperty("resourceModelInfo")
-    private ModelInfo modelInfo;
-    @JsonProperty("requiredCandidates")
-    private List<Candidate> requiredCandidates;
-    @JsonProperty("excludedCandidates")
-    private List<Candidate> excludedCandidates;
-    @JsonProperty("existingCandidates")
-    private List<Candidate> existingCandidates;
-    @JsonProperty("filteringAttributes")
-    private List<Candidate> filteringAttributes;
-
-
-    public List<Candidate> getRequiredCandidates() {
-        return requiredCandidates;
-    }
-
-    public void setRequiredCandidates(List<Candidate> requiredCandidates) {
-        this.requiredCandidates = requiredCandidates;
-    }
-
-    public List<Candidate> getExcludedCandidates() {
-        return excludedCandidates;
-    }
-
-    public void setExcludedCandidates(List<Candidate> excludedCandidates) {
-        this.excludedCandidates = excludedCandidates;
-    }
-
-    public String getServiceResourceId() {
-        return serviceResourceId;
-    }
-
-    public void setServiceResourceId(String serviceResourceId) {
-        this.serviceResourceId = serviceResourceId;
-    }
-
-    public String getResourceModuleName() {
-        return resourceModuleName;
-    }
-
-    public void setResourceModuleName(String resourceModuleName) {
-        this.resourceModuleName = resourceModuleName;
-    }
-
-    public ModelInfo getModelInfo() {
-        return modelInfo;
-    }
-
-    public void setModelInfo(ModelInfo modelInfo) {
-        this.modelInfo = modelInfo;
-    }
-
-    public List<Candidate> getExistingCandidates() {
-        return existingCandidates;
-    }
-
-    public void setExistingCandidates(List<Candidate> existingCandidates) {
-        this.existingCandidates = existingCandidates;
-    }
-
-    public List<Candidate> getFilteringAttributes() {
-        return filteringAttributes;
-    }
-
-    public void setFilteringAttributes(List<Candidate> filteringAttributes) {
-        this.filteringAttributes = filteringAttributes;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/LicenseInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/LicenseInfo.java
deleted file mode 100644
index 9ab3ae6..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/LicenseInfo.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class LicenseInfo implements Serializable {
-
-    private static final long serialVersionUID = 6878164369491185856L;
-
-    @JsonProperty("licenseDemands")
-    private List<Demand> demands = new ArrayList<>();
-
-
-    public List<Demand> getDemands() {
-        return demands;
-    }
-
-    public void setDemands(List<Demand> demands) {
-        this.demands = demands;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ManagerProperties.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ManagerProperties.java
deleted file mode 100644
index 70b1a37..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ManagerProperties.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.util.Map;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-@ConfigurationProperties(prefix = "sniro.manager")
-public class ManagerProperties {
-
-    private String host;
-    private Map<String, String> uri;
-    private Map<String, String> headers;
-
-
-    public String getHost() {
-        return host;
-    }
-
-    public void setHost(String host) {
-        this.host = host;
-    }
-
-    public Map<String, String> getUri() {
-        return uri;
-    }
-
-    public void setUri(Map<String, String> uri) {
-        this.uri = uri;
-    }
-
-    public Map<String, String> getHeaders() {
-        return headers;
-    }
-
-    public void setHeaders(Map<String, String> headers) {
-        this.headers = headers;
-    }
-
-
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ModelInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ModelInfo.java
deleted file mode 100644
index 6c1932e..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ModelInfo.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
-
-@JsonPropertyOrder({"modelName", "modelVersionId", "modelVersion", "modelInvariantId"})
-@JsonRootName("modelInfo")
-public class ModelInfo implements Serializable {
-
-    private static final long serialVersionUID = 1488642558601651075L;
-
-    @JsonProperty("modelInvariantId")
-    private String modelInvariantId;
-    @JsonProperty("modelVersionId")
-    private String modelVersionId;
-    @JsonProperty("modelName")
-    private String modelName;
-    @JsonProperty("modelVersion")
-    private String modelVersion;
-
-
-    public String getModelInvariantId() {
-        return modelInvariantId;
-    }
-
-    public void setModelInvariantId(String modelInvariantId) {
-        this.modelInvariantId = modelInvariantId;
-    }
-
-    public String getModelVersionId() {
-        return modelVersionId;
-    }
-
-    public void setModelVersionId(String modelVersionId) {
-        this.modelVersionId = modelVersionId;
-    }
-
-    public String getModelName() {
-        return modelName;
-    }
-
-    public void setModelName(String modelName) {
-        this.modelName = modelName;
-    }
-
-    public String getModelVersion() {
-        return modelVersion;
-    }
-
-    public void setModelVersion(String modelVersion) {
-        this.modelVersion = modelVersion;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/PlacementInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/PlacementInfo.java
deleted file mode 100644
index bbbbf9c..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/PlacementInfo.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRawValue;
-import com.fasterxml.jackson.annotation.JsonRootName;
-
-@JsonPropertyOrder({"subscriberInfo", "placementDemands", "requestParameters"})
-@JsonRootName("placementInfo")
-public class PlacementInfo implements Serializable {
-
-    private static final long serialVersionUID = -964488472247386556L;
-
-    @JsonProperty("subscriberInfo")
-    private SubscriberInfo subscriberInfo;
-    @JsonProperty("placementDemands")
-    private List<Demand> demands = new ArrayList<>();
-    @JsonRawValue
-    @JsonProperty("requestParameters")
-    private String requestParameters;
-
-
-    public SubscriberInfo getSubscriberInfo() {
-        return subscriberInfo;
-    }
-
-    public void setSubscriberInfo(SubscriberInfo subscriberInfo) {
-        this.subscriberInfo = subscriberInfo;
-    }
-
-    public List<Demand> getDemands() {
-        return demands;
-    }
-
-    public void setDemands(List<Demand> demands) {
-        this.demands = demands;
-    }
-
-    public String getRequestParameters() {
-        return requestParameters;
-    }
-
-    public void setRequestParameters(String requestParameters) {
-        this.requestParameters = requestParameters;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/RequestInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/RequestInfo.java
deleted file mode 100644
index fc6aec7..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/RequestInfo.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonRootName;
-
-
-@JsonRootName("requestInfo")
-public class RequestInfo implements Serializable {
-
-    private static final long serialVersionUID = -759180997599143791L;
-
-    @JsonProperty("transactionId")
-    String transactionId;
-    @JsonProperty("requestId")
-    String requestId;
-    @JsonProperty("callbackUrl")
-    String callbackUrl;
-    @JsonProperty("sourceId")
-    String sourceId = "mso";
-    @JsonProperty("requestType")
-    String requestType;
-    @JsonProperty("timeout")
-    long timeout;
-
-    public String getTransactionId() {
-        return transactionId;
-    }
-
-    public void setTransactionId(String transactionId) {
-        this.transactionId = transactionId;
-    }
-
-    public String getRequestId() {
-        return requestId;
-    }
-
-    public void setRequestId(String requestId) {
-        this.requestId = requestId;
-    }
-
-    public String getCallbackUrl() {
-        return callbackUrl;
-    }
-
-    public void setCallbackUrl(String callbackUrl) {
-        this.callbackUrl = callbackUrl;
-    }
-
-    public String getSourceId() {
-        return sourceId;
-    }
-
-    public void setSourceId(String sourceId) {
-        this.sourceId = sourceId;
-    }
-
-    public String getRequestType() {
-        return requestType;
-    }
-
-    public void setRequestType(String requestType) {
-        this.requestType = requestType;
-    }
-
-    public long getTimeout() {
-        return timeout;
-    }
-
-    public void setTimeout(long timeout) {
-        this.timeout = timeout;
-    }
-
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Resource.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Resource.java
deleted file mode 100644
index b5d40a8..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Resource.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class Resource implements Serializable {
-
-    private static final long serialVersionUID = 5949861520571440421L;
-
-    @JsonProperty("service-resource-id")
-    private String serviceResourceId;
-    @JsonProperty("status")
-    private String status;
-
-
-    public String getServiceResourceId() {
-        return serviceResourceId;
-    }
-
-    public void setServiceResourceId(String serviceResourceId) {
-        this.serviceResourceId = serviceResourceId;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ServiceInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ServiceInfo.java
deleted file mode 100644
index 8b6f234..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/ServiceInfo.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRootName;
-
-@JsonPropertyOrder({"modelInfo", "serviceRole", "serviceInstanceId", "serviceName"})
-@JsonRootName("serviceInfo")
-public class ServiceInfo implements Serializable {
-
-    private static final long serialVersionUID = -6866022419398548585L;
-
-    @JsonProperty("serviceInstanceId")
-    private String serviceInstanceId;
-    @JsonProperty("serviceName")
-    private String serviceName;
-    @JsonProperty("serviceRole")
-    private String serviceRole;
-    @JsonProperty("modelInfo")
-    private ModelInfo modelInfo;
-
-
-    public String getServiceInstanceId() {
-        return serviceInstanceId;
-    }
-
-    public void setServiceInstanceId(String serviceInstanceId) {
-        this.serviceInstanceId = serviceInstanceId;
-    }
-
-    public String getServiceName() {
-        return serviceName;
-    }
-
-    public void setServiceName(String serviceName) {
-        this.serviceName = serviceName;
-    }
-
-    public String getServiceRole() {
-        return serviceRole;
-    }
-
-    public void setServiceRole(String serviceRole) {
-        this.serviceRole = serviceRole;
-    }
-
-    public ModelInfo getModelInfo() {
-        return modelInfo;
-    }
-
-    public void setModelInfo(ModelInfo modelInfo) {
-        this.modelInfo = modelInfo;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroConductorRequest.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroConductorRequest.java
deleted file mode 100644
index b8896a2..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroConductorRequest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.ObjectWriter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class SniroConductorRequest implements Serializable {
-
-    private static final long serialVersionUID = 1906052095861777655L;
-    private static final Logger logger = LoggerFactory.getLogger(SniroConductorRequest.class);
-
-    @JsonProperty("release-locks")
-    private List<Resource> resources = new ArrayList<>();
-
-
-    public List<Resource> getResources() {
-        return resources;
-    }
-
-    @JsonInclude(Include.NON_NULL)
-    public String toJsonString() {
-        String json = "";
-        ObjectMapper mapper = new ObjectMapper();
-        mapper.setSerializationInclusion(Include.NON_NULL);
-        ObjectWriter ow = mapper.writer().withDefaultPrettyPrinter();
-        try {
-            json = ow.writeValueAsString(this);
-        } catch (Exception e) {
-            logger.error("Unable to convert SniroConductorRequest to string", e);
-        }
-        return json;
-    }
-
-
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroManagerRequest.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroManagerRequest.java
deleted file mode 100644
index 4babbe5..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SniroManagerRequest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonInclude.Include;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.ObjectWriter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class SniroManagerRequest implements Serializable {
-
-    private static final long serialVersionUID = -1541132882892163132L;
-    private static final Logger logger = LoggerFactory.getLogger(SniroManagerRequest.class);
-
-    @JsonProperty("requestInfo")
-    private RequestInfo requestInformation;
-    @JsonProperty("serviceInfo")
-    private ServiceInfo serviceInformation;
-    @JsonProperty("placementInfo")
-    private PlacementInfo placementInformation;
-    @JsonProperty("licenseInfo")
-    private LicenseInfo licenseInformation;
-
-
-    public RequestInfo getRequestInformation() {
-        return requestInformation;
-    }
-
-    public void setRequestInformation(RequestInfo requestInformation) {
-        this.requestInformation = requestInformation;
-    }
-
-    public ServiceInfo getServiceInformation() {
-        return serviceInformation;
-    }
-
-    public void setServiceInformation(ServiceInfo serviceInformation) {
-        this.serviceInformation = serviceInformation;
-    }
-
-    public PlacementInfo getPlacementInformation() {
-        return placementInformation;
-    }
-
-    public void setPlacementInformation(PlacementInfo placementInformation) {
-        this.placementInformation = placementInformation;
-    }
-
-    public LicenseInfo getLicenseInformation() {
-        return licenseInformation;
-    }
-
-    public void setLicenseInformation(LicenseInfo licenseInformation) {
-        this.licenseInformation = licenseInformation;
-    }
-
-
-    @JsonInclude(Include.NON_NULL)
-    public String toJsonString() {
-        String json = "";
-        ObjectMapper mapper = new ObjectMapper();
-        mapper.setSerializationInclusion(Include.NON_NULL);
-        ObjectWriter ow = mapper.writer().withDefaultPrettyPrinter();
-        try {
-            json = ow.writeValueAsString(this);
-        } catch (Exception e) {
-            logger.error("Unable to convert SniroManagerRequest to string", e);
-        }
-        return json.replaceAll("\\\\", "");
-    }
-
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SubscriberInfo.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SubscriberInfo.java
deleted file mode 100644
index 35a4cac..0000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/SubscriberInfo.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro.beans;
-
-import java.io.Serializable;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonRootName;
-
-@JsonRootName("subscriberInfo")
-public class SubscriberInfo implements Serializable {
-
-    private static final long serialVersionUID = -6350949051379748872L;
-
-    @JsonProperty("globalSubscriberId")
-    private String globalSubscriberId;
-    @JsonProperty("subscriberName")
-    private String subscriberName;
-    @JsonProperty("subscriberCommonSiteId")
-    private String subscriberCommonSiteId;
-
-
-    public String getGlobalSubscriberId() {
-        return globalSubscriberId;
-    }
-
-    public void setGlobalSubscriberId(String globalSubscriberId) {
-        this.globalSubscriberId = globalSubscriberId;
-    }
-
-    public String getSubscriberName() {
-        return subscriberName;
-    }
-
-    public void setSubscriberName(String subscriberName) {
-        this.subscriberName = subscriberName;
-    }
-
-    public String getSubscriberCommonSiteId() {
-        return subscriberCommonSiteId;
-    }
-
-    public void setSubscriberCommonSiteId(String subscriberCommonSiteId) {
-        this.subscriberCommonSiteId = subscriberCommonSiteId;
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/oof/OofClientTestIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/oof/OofClientTestIT.java
deleted file mode 100644
index 3ae0db6..0000000
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/oof/OofClientTestIT.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2018 Intel Corp. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.oof;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
-import static org.junit.Assert.assertEquals;
-import org.junit.Test;
-import org.onap.so.BaseIntegrationTest;
-import org.onap.so.client.exception.BadResponseException;
-import org.onap.so.client.oof.beans.LicenseInfo;
-import org.onap.so.client.oof.beans.ModelInfo;
-import org.onap.so.client.oof.beans.OofRequest;
-import org.onap.so.client.oof.beans.OofRequestParameters;
-import org.onap.so.client.oof.beans.PlacementDemand;
-import org.onap.so.client.oof.beans.PlacementInfo;
-import org.onap.so.client.oof.beans.RequestInfo;
-import org.onap.so.client.oof.beans.ResourceModelInfo;
-import org.onap.so.client.oof.beans.ServiceInfo;
-import org.onap.so.client.oof.beans.SubscriberInfo;
-import org.skyscreamer.jsonassert.JSONAssert;
-import org.springframework.beans.factory.annotation.Autowired;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import java.util.ArrayList;
-import java.util.List;
-
-
-public class OofClientTestIT extends BaseIntegrationTest {
-
-    @Autowired
-    private OofClient client;
-
-    @Test
-    public void testPostDemands_success() throws BadResponseException, JsonProcessingException {
-        String mockResponse =
-                "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"status\", \"requestStatus\": \"accepted\"}";
-
-        ModelInfo modelInfo = new ModelInfo();
-        modelInfo.setModelCustomizationName("modelCustomizationName-Service");
-        modelInfo.setModelInvariantId("modelInvariantId-Service");
-        modelInfo.setModelName("modelName-Service");
-        modelInfo.setModelType("modelType-Service");
-        modelInfo.setModelVersion("modelVersion-Service");
-        modelInfo.setModelVersionId("modelVersionId-Service");
-
-        ServiceInfo serviceInfo = new ServiceInfo();
-        serviceInfo.setModelInfo(modelInfo);
-        serviceInfo.setServiceInstanceId("serviceInstanceId");
-        serviceInfo.setServiceName("serviceName");
-
-        SubscriberInfo subscriberInfo = new SubscriberInfo();
-        subscriberInfo.setGlobalSubscriberId("globalSubscriberId");
-        subscriberInfo.setSubscriberCommonSiteId("subscriberCommonSiteId");
-        subscriberInfo.setSubscriberName("subscriberName");
-
-        ResourceModelInfo resourceModelInfo = new ResourceModelInfo();
-        resourceModelInfo.setModelType("modelType");
-        resourceModelInfo.setModelCustomizationName("modelCustomizationName");
-        resourceModelInfo.setModelInvariantId("invarianteId");
-        resourceModelInfo.setModelName("modelName");
-        resourceModelInfo.setModelVersion("version");
-        resourceModelInfo.setModelVersionId("versionId");
-
-        PlacementDemand placementDemand = new PlacementDemand();
-        placementDemand.setResourceModelInfo(resourceModelInfo);
-        placementDemand.setResourceModuleName("resourceModuleName");
-        placementDemand.setServiceResourceId("serviceResourceId");
-        placementDemand.setTenantId("tenantId");
-
-        OofRequestParameters oofRequestParameters = new OofRequestParameters();
-        oofRequestParameters.setCustomerLatitude("customerLatitude");
-        oofRequestParameters.setCustomerLongitude("customerLongitude");
-        oofRequestParameters.setCustomerName("customerName");
-
-        ArrayList<PlacementDemand> placementDemands = new ArrayList<>();
-        placementDemands.add(placementDemand);
-
-        PlacementInfo placementInfo = new PlacementInfo();
-        placementInfo.setPlacementDemands(placementDemands);
-        placementInfo.setRequestParameters(oofRequestParameters);
-        placementInfo.setSubscriberInfo(subscriberInfo);
-
-        RequestInfo requestInfo = new RequestInfo();
-        requestInfo.setTransactionId("transactionId");
-        List<String> optimizer = new ArrayList<>();
-        optimizer.add("optimizer1");
-        optimizer.add("optimizer2");
-        requestInfo.setOptimizers(optimizer);
-        requestInfo.setCallbackUrl("callBackUrl");
-        requestInfo.setNumSolutions(1);
-        requestInfo.setRequestId("requestId");
-        requestInfo.setSourceId("sourceId");
-        requestInfo.setTimeout(30L);
-        requestInfo.setRequestType("requestType");
-
-        OofRequest oofRequest = new OofRequest();
-        oofRequest.setRequestInformation(requestInfo);
-        oofRequest.setPlacementInformation(placementInfo);
-        oofRequest.setServiceInformation(serviceInfo);
-        oofRequest.setLicenseInformation(new LicenseInfo());
-
-        wireMockServer.stubFor(post(urlEqualTo("/api/oof/v1/placement")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-        client.postDemands(oofRequest);
-
-        String oofRequestOutput = oofRequest.toJsonString();
-        JSONAssert.assertEquals("{\n" + "  \"requestInfo\" : {\n" + "    \"transactionId\" : \"transactionId\",\n"
-                + "    \"requestId\" : \"requestId\",\n" + "    \"callbackUrl\" : \"callBackUrl\",\n"
-                + "    \"sourceId\" : \"sourceId\",\n" + "    \"requestType\" : \"requestType\",\n"
-                + "    \"numSolutions\" : 1,\n" + "    \"optimizers\" : [ \"optimizer1\", \"optimizer2\" ],\n"
-                + "    \"timeout\" : 30\n" + "  },\n" + "  \"serviceInfo\" : {\n"
-                + "    \"serviceInstanceId\" : \"serviceInstanceId\",\n" + "    \"serviceName\" : \"serviceName\",\n"
-                + "    \"modelInfo\" : {\n" + "      \"modelType\" : \"modelType-Service\",\n"
-                + "      \"modelInvariantId\" : \"modelInvariantId-Service\",\n"
-                + "      \"modelVersionId\" : \"modelVersionId-Service\",\n"
-                + "      \"modelName\" : \"modelName-Service\",\n"
-                + "      \"modelVersion\" : \"modelVersion-Service\",\n"
-                + "      \"modelCustomizationName\" : \"modelCustomizationName-Service\"\n" + "    }\n" + "  },\n"
-                + "  \"placementInfo\" : {\n" + "    \"requestParameters\" : {\n"
-                + "      \"customerLatitude\" : \"customerLatitude\",\n"
-                + "      \"customerLongitude\" : \"customerLongitude\",\n"
-                + "      \"customerName\" : \"customerName\"\n" + "    },\n" + "    \"subscriberInfo\" : {\n"
-                + "      \"globalSubscriberId\" : \"globalSubscriberId\",\n"
-                + "      \"subscriberName\" : \"subscriberName\",\n"
-                + "      \"subscriberCommonSiteId\" : \"subscriberCommonSiteId\"\n" + "    },\n"
-                + "    \"placementDemands\" : [ {\n" + "      \"resourceModuleName\" : \"resourceModuleName\",\n"
-                + "      \"serviceResourceId\" : \"serviceResourceId\",\n" + "      \"tenantId\" : \"tenantId\",\n"
-                + "      \"resourceModelInfo\" : {\n" + "        \"modelType\" : \"modelType\",\n"
-                + "        \"modelInvariantId\" : \"invarianteId\",\n" + "        \"modelVersionId\" : \"versionId\",\n"
-                + "        \"modelName\" : \"modelName\",\n" + "        \"modelVersion\" : \"version\",\n"
-                + "        \"modelCustomizationName\" : \"modelCustomizationName\"\n" + "      }\n" + "    } ]\n"
-                + "  },\n" + "  \"licenseInfo\" : { \n" + "    \"licenseDemands\" : [ ]\n" + "}\n" + "}",
-                oofRequestOutput, false);
-    }
-
-    @Test
-    public void testAsyncResponse_success() throws BadResponseException, JsonProcessingException {
-        String mockResponse =
-                "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"status\", \"requestStatus\": \"accepted\"}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/api/oof/v1/placement")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-        client.postDemands(new OofRequest());
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostDemands_error_failed() throws JsonProcessingException, BadResponseException {
-        String mockResponse =
-                "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"missing data\", \"requestStatus\": \"failed\"}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/api/oof/v1/placement")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-
-        client.postDemands(new OofRequest());
-
-        // TODO assertEquals("missing data", );
-
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostDemands_error_noMessage() throws JsonProcessingException, BadResponseException {
-        String mockResponse =
-                "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"\", \"requestStatus\": \"failed\"}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/api/oof/v1/placement")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-
-        client.postDemands(new OofRequest());
-
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostDemands_error_noStatus() throws JsonProcessingException, BadResponseException {
-        String mockResponse =
-                "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"missing data\", \"requestStatus\": null}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/api/oof/v1/placement")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-
-        client.postDemands(new OofRequest());
-
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostDemands_error_empty() throws JsonProcessingException, BadResponseException {
-        String mockResponse = "{ }";
-
-        wireMockServer.stubFor(post(urlEqualTo("/api/oof/v1/placement")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-
-        client.postDemands(new OofRequest());
-    }
-
-}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sniro/SniroClientTestIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sniro/SniroClientTestIT.java
deleted file mode 100644
index 56c5238..0000000
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/sniro/SniroClientTestIT.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.client.sniro;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
-import org.junit.Test;
-import org.onap.so.BaseIntegrationTest;
-import org.onap.so.client.exception.BadResponseException;
-import org.onap.so.client.sniro.beans.SniroConductorRequest;
-import org.onap.so.client.sniro.beans.SniroManagerRequest;
-import org.springframework.beans.factory.annotation.Autowired;
-import com.fasterxml.jackson.core.JsonProcessingException;
-
-
-public class SniroClientTestIT extends BaseIntegrationTest {
-
-    @Autowired
-    private SniroClient client;
-
-
-    @Test(expected = Test.None.class)
-    public void testPostDemands_success() throws BadResponseException, JsonProcessingException {
-        String mockResponse =
-                "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"corys cool\", \"requestStatus\": \"accepted\"}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-        client.postDemands(new SniroManagerRequest());
-
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostDemands_error_failed() throws JsonProcessingException, BadResponseException {
-        String mockResponse =
-                "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"missing data\", \"requestStatus\": \"failed\"}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-
-        client.postDemands(new SniroManagerRequest());
-
-        // TODO assertEquals("missing data", );
-
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostDemands_error_noMessage() throws JsonProcessingException, BadResponseException {
-        String mockResponse =
-                "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"\", \"requestStatus\": \"failed\"}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-
-        client.postDemands(new SniroManagerRequest());
-
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostDemands_error_noStatus() throws JsonProcessingException, BadResponseException {
-        String mockResponse =
-                "{\"transactionId\": \"123456789\", \"requestId\": \"1234\", \"statusMessage\": \"missing data\", \"requestStatus\": null}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-
-        client.postDemands(new SniroManagerRequest());
-
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostDemands_error_empty() throws JsonProcessingException, BadResponseException {
-        String mockResponse = "{ }";
-
-        wireMockServer.stubFor(post(urlEqualTo("/sniro/api/placement/v2")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-
-        client.postDemands(new SniroManagerRequest());
-    }
-
-    @Test(expected = Test.None.class)
-    public void testPostRelease_success() throws BadResponseException, JsonProcessingException {
-        String mockResponse = "{\"status\": \"success\", \"message\": \"corys cool\"}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/v1/release-orders")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-        client.postRelease(new SniroConductorRequest());
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostRelease_error_failed() throws BadResponseException, JsonProcessingException {
-        String mockResponse = "{\"status\": \"failure\", \"message\": \"corys cool\"}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/v1/release-orders")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-        client.postRelease(new SniroConductorRequest());
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostRelease_error_noStatus() throws BadResponseException, JsonProcessingException {
-        String mockResponse = "{\"status\": \"\", \"message\": \"corys cool\"}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/v1/release-orders")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-        client.postRelease(new SniroConductorRequest());
-
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostRelease_error_noMessage() throws BadResponseException, JsonProcessingException {
-        String mockResponse = "{\"status\": \"failure\", \"message\": null}";
-
-        wireMockServer.stubFor(post(urlEqualTo("/v1/release-orders")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-        client.postRelease(new SniroConductorRequest());
-
-    }
-
-    @Test(expected = BadResponseException.class)
-    public void testPostRelease_error_empty() throws BadResponseException, JsonProcessingException {
-        String mockResponse = "{ }";
-
-        wireMockServer.stubFor(post(urlEqualTo("/v1/release-orders")).willReturn(
-                aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody(mockResponse)));
-
-        client.postRelease(new SniroConductorRequest());
-
-    }
-
-}
