Refactored code to enable its utilization in Junit 42/134942/3
authorwaqas.ikram <waqas.ikram@est.tech>
Fri, 16 Jun 2023 12:05:04 +0000 (13:05 +0100)
committerWaqas Ikram <waqas.ikram@est.tech>
Tue, 20 Jun 2023 09:40:08 +0000 (09:40 +0000)
tests for the client

Change-Id: I847ae0f48444af907039bfddb9879581003c0f35
Issue-ID: CPS-1751
Signed-off-by: waqas.ikram <waqas.ikram@est.tech>
cps-ncmp-rest-stub/cps-ncmp-rest-stub-app/pom.xml [new file with mode: 0644]
cps-ncmp-rest-stub/cps-ncmp-rest-stub-app/src/main/java/org/onap/cps/ncmp/rest/stub/Application.java [moved from cps-ncmp-rest-stub/src/main/java/org/onap/cps/ncmp/rest/stub/Application.java with 100% similarity]
cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/pom.xml [new file with mode: 0644]
cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/src/main/java/org/onap/cps/ncmp/rest/stub/controller/NetworkCmProxyStubController.java [moved from cps-ncmp-rest-stub/src/main/java/org/onap/cps/ncmp/rest/stub/controller/NetworkCmProxyStubController.java with 51% similarity]
cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/src/main/resources/application.yml [moved from cps-ncmp-rest-stub/src/main/resources/application.yml with 100% similarity]
cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/src/main/resources/stubs/cmHandlesSearch.json [moved from cps-ncmp-rest-stub/src/main/resources/stubs/cmHandlesSearch.json with 100% similarity]
cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/src/main/resources/stubs/passthrough-operational-example.json [moved from cps-ncmp-rest-stub/src/main/resources/stubs/passthrough-operational-example.json with 100% similarity]
cps-ncmp-rest-stub/pom.xml
cps-ncmp-rest-stub/src/main/java/org/onap/cps/ncmp/rest/stub/handlers/NetworkCmProxyApiStubDefaultImpl.java [deleted file]
cps-ncmp-rest-stub/src/test/java/org/onap/cps/TestApplication.java [deleted file]
cps-parent/pom.xml

diff --git a/cps-ncmp-rest-stub/cps-ncmp-rest-stub-app/pom.xml b/cps-ncmp-rest-stub/cps-ncmp-rest-stub-app/pom.xml
new file mode 100644 (file)
index 0000000..7a244c4
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2023 Nordix Foundation
+  ================================================================================
+  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.
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.cps</groupId>
+        <artifactId>cps-ncmp-rest-stub</artifactId>
+        <version>3.3.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>cps-ncmp-rest-stub-app</artifactId>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <mainClass>org.onap.cps.ncmp.rest.stub.Application</mainClass>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.cps</groupId>
+            <artifactId>cps-ncmp-rest-stub-service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/pom.xml b/cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/pom.xml
new file mode 100644 (file)
index 0000000..fc33270
--- /dev/null
@@ -0,0 +1,50 @@
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2023 Nordix Foundation
+  ================================================================================
+  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.
+  SPDX-License-Identifier: Apache-2.0
+  ============LICENSE_END=========================================================
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.cps</groupId>
+        <artifactId>cps-ncmp-rest-stub</artifactId>
+        <version>3.3.3-SNAPSHOT</version>
+    </parent>
+    <artifactId>cps-ncmp-rest-stub-service</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-jetty</artifactId>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.cps</groupId>
+            <artifactId>cps-ncmp-rest</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
@@ -30,11 +30,18 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
+import javax.validation.Valid;
+import javax.validation.constraints.NotNull;
 import lombok.extern.slf4j.Slf4j;
 import org.onap.cps.ncmp.api.impl.operations.DatastoreType;
+import org.onap.cps.ncmp.rest.api.NetworkCmProxyApi;
 import org.onap.cps.ncmp.rest.model.CmHandleQueryParameters;
+import org.onap.cps.ncmp.rest.model.ResourceDataBatchRequest;
+import org.onap.cps.ncmp.rest.model.RestModuleDefinition;
+import org.onap.cps.ncmp.rest.model.RestModuleReference;
 import org.onap.cps.ncmp.rest.model.RestOutputCmHandle;
-import org.onap.cps.ncmp.rest.stub.handlers.NetworkCmProxyApiStubDefaultImpl;
+import org.onap.cps.ncmp.rest.model.RestOutputCmHandleCompositeState;
+import org.onap.cps.ncmp.rest.model.RestOutputCmHandlePublicProperties;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.http.HttpStatus;
@@ -42,28 +49,29 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+
 @Slf4j
 @RestController
 @RequestMapping("${rest.api.ncmp-stub-base-path}")
-public class NetworkCmProxyStubController implements NetworkCmProxyApiStubDefaultImpl {
+public class NetworkCmProxyStubController implements NetworkCmProxyApi {
 
     @Value("${stub.path}")
     private String pathToResponseFiles;
+    private static final String ASYNC_REQUEST_ID = "requestId";
 
     @Override
-    public ResponseEntity<Object> getResourceDataForCmHandle(final String dataStoreName,
-                                                             final String cmHandle,
+    public ResponseEntity<Object> getResourceDataForCmHandle(final String datastoreName, final String cmHandle,
                                                              final String resourceIdentifier,
                                                              final String optionsParamInQuery,
                                                              final String topicParamInQuery,
                                                              final Boolean includeDescendants) {
-        if (DatastoreType.PASSTHROUGH_OPERATIONAL == DatastoreType.fromDatastoreName(dataStoreName)) {
+        if (DatastoreType.PASSTHROUGH_OPERATIONAL == DatastoreType.fromDatastoreName(datastoreName)) {
             final ResponseEntity<Map<String, Object>> asyncResponse = populateAsyncResponse(topicParamInQuery);
             final Map<String, Object> asyncResponseData = asyncResponse.getBody();
             Object responseObject = null;
             // read JSON file and map/convert to java POJO
-            final ClassPathResource resource =
-                    new ClassPathResource(pathToResponseFiles + "passthrough-operational-example.json");
+            final ClassPathResource resource = new ClassPathResource(
+                    pathToResponseFiles + "passthrough-operational-example.json");
             try (InputStream inputStream = resource.getInputStream()) {
                 final String string = new String(inputStream.readAllBytes(), StandardCharsets.UTF_8);
                 final ObjectMapper mapper = new ObjectMapper();
@@ -113,4 +121,90 @@ public class NetworkCmProxyStubController implements NetworkCmProxyApiStubDefaul
         asyncResponseData.put(ASYNC_REQUEST_ID, resourceDataRequestId);
         return asyncResponseData;
     }
+
+    @Override
+    public ResponseEntity<Void> createResourceDataRunningForCmHandle(@NotNull @Valid final String resourceIdentifier,
+                                                                     final String datastoreName, final String cmHandle,
+                                                                     @Valid final Object body,
+                                                                     final String contentType) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+    }
+
+    @Override
+    public ResponseEntity<Void> deleteResourceDataRunningForCmHandle(final String datastoreName, final String cmHandle,
+                                                                     @NotNull @Valid final String resourceIdentifier,
+                                                                     final String contentType) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+    }
+
+    @Override
+    public ResponseEntity<RestOutputCmHandlePublicProperties> getCmHandlePublicPropertiesByCmHandleId(
+            final String cmHandle) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+    }
+
+    @Override
+    public ResponseEntity<RestOutputCmHandleCompositeState> getCmHandleStateByCmHandleId(final String cmHandle) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+    }
+
+    @Override
+    public ResponseEntity<List<RestModuleDefinition>> getModuleDefinitionsByCmHandleId(final String cmHandle) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+    }
+
+    @Override
+    public ResponseEntity<List<RestModuleReference>> getModuleReferencesByCmHandle(final String cmHandle) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+    }
+
+    @Override
+    public ResponseEntity<Object> getResourceDataForCmHandleBatch(@NotNull @Valid final String topic,
+                                                                  @Valid final ResourceDataBatchRequest body) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+    }
+
+    @Override
+    public ResponseEntity<Object> patchResourceDataRunningForCmHandle(@NotNull @Valid final String resourceIdentifier,
+                                                                      final String datastoreName, final String cmHandle,
+                                                                      @Valid final Object body,
+                                                                      final String contentType) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+    }
+
+    @Override
+    public ResponseEntity<Object> queryResourceDataForCmHandle(final String datastoreName, final String cmHandle,
+                                                               @Valid final String cpsPath, @Valid final String options,
+                                                               @Valid final String topic,
+                                                               @Valid final Boolean includeDescendants) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+    }
+
+    @Override
+    public ResponseEntity<RestOutputCmHandle> retrieveCmHandleDetailsById(final String cmHandle) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+    }
+
+    @Override
+    public ResponseEntity<List<String>> searchCmHandleIds(@Valid final CmHandleQueryParameters body) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+    }
+
+    @Override
+    public ResponseEntity<Object> setDataSyncEnabledFlagForCmHandle(final String cmHandle,
+                                                                    @NotNull @Valid final Boolean dataSyncEnabled) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+    }
+
+    @Override
+    public ResponseEntity<Object> updateResourceDataRunningForCmHandle(@NotNull @Valid final String resourceIdentifier,
+                                                                       final String datastoreName,
+                                                                       final String cmHandle, @Valid final Object body,
+                                                                       final String contentType) {
+        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+    }
 }
index 0a6684f..7fa44e6 100644 (file)
@@ -6,22 +6,18 @@
   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.
-
   SPDX-License-Identifier: Apache-2.0
   ============LICENSE_END=========================================================
 -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.onap.cps</groupId>
     </parent>
 
     <artifactId>cps-ncmp-rest-stub</artifactId>
+    <packaging>pom</packaging>
+
     <properties>
-        <app>org.onap.cps.ncmp.rest.stub.Application</app>
-        <java.version>11</java.version>
-        <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
-        <sonar.coverage.jacoco.xmlReportPaths>
-            ../jacoco-report/target/site/jacoco-aggregate/jacoco.xml
-        </sonar.coverage.jacoco.xmlReportPaths>
-        <groovy.version>3.0.8</groovy.version>
-        <nexusproxy>https://nexus.onap.org</nexusproxy>
-        <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
-        <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
+        <parent.directory>${project.parent.basedir}/..</parent.directory>
         <sonar.skip>true</sonar.skip>
-        <mapstruct.version>1.4.2.Final</mapstruct.version>
     </properties>
 
-    <dependencies>
-        <dependency>
-            <groupId>io.swagger.core.v3</groupId>
-            <artifactId>swagger-annotations</artifactId>
-            <version>2.1.4</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.springframework.boot</groupId>
-                    <artifactId>spring-boot-starter-tomcat</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-validation</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-jetty</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.mapstruct</groupId>
-            <artifactId>mapstruct</artifactId>
-            <version>${mapstruct.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.mapstruct</groupId>
-            <artifactId>mapstruct-processor</artifactId>
-            <version>${mapstruct.version}</version>
-        </dependency>
-        <!-- T E S T   D E P E N D E N C I E S -->
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-        </dependency>
-        <dependency>
-            <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-simple</artifactId>
-            <version>1.8.0-beta4</version>
-        </dependency>
-        <dependency>
-            <groupId>cglib</groupId>
-            <artifactId>cglib-nodep</artifactId>
-            <scope>test</scope>
-            <version>3.1</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.onap.cps</groupId>
-            <artifactId>cps-ncmp-rest</artifactId>
-            <optional>true</optional>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <!-- Swagger code generation. -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.3.2</version>
-                <configuration>
-                    <source>${java.version}</source>
-                    <target>${java.version}</target>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-shade-plugin</artifactId>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.springframework.boot</groupId>
-                        <artifactId>spring-boot-maven-plugin</artifactId>
-                        <version>1.2.7.RELEASE</version>
-                    </dependency>
-                </dependencies>
-                <configuration>
-                    <keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
-                    <createDependencyReducedPom>true</createDependencyReducedPom>
-                    <filters>
-                        <filter>
-                            <artifact>*:*</artifact>
-                            <excludes>
-                                <exclude>org/onap/cps/ncmp/rest/controller/**</exclude>
-                            </excludes>
-                        </filter>
-                    </filters>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <transformers>
-                                <transformer
-                                  implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-                                    <resource>META-INF/spring.handlers</resource>
-                                </transformer>
-                                <transformer
-                                  implementation="org.springframework.boot.maven.PropertiesMergingResourceTransformer">
-                                    <resource>META-INF/spring.factories</resource>
-                                </transformer>
-                                <transformer
-                                  implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-                                    <resource>META-INF/spring.schemas</resource>
-                                </transformer>
-                                <transformer
-                                  implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
-                                <transformer
-                                  implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>org/onap/cps/ncmp/rest/stub/Application</mainClass>
-                                </transformer>
-                            </transformers>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
+    <modules>
+        <module>cps-ncmp-rest-stub-service</module>
+        <module>cps-ncmp-rest-stub-app</module>
+    </modules>
+</project>
\ No newline at end of file
diff --git a/cps-ncmp-rest-stub/src/main/java/org/onap/cps/ncmp/rest/stub/handlers/NetworkCmProxyApiStubDefaultImpl.java b/cps-ncmp-rest-stub/src/main/java/org/onap/cps/ncmp/rest/stub/handlers/NetworkCmProxyApiStubDefaultImpl.java
deleted file mode 100644 (file)
index 7bd3acb..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- *  ============LICENSE_START=======================================================
- *  Copyright (C) 2023 Nordix Foundation
- *  ================================================================================
- *  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.
- *
- *  SPDX-License-Identifier: Apache-2.0
- *  ============LICENSE_END=========================================================
- */
-
-package org.onap.cps.ncmp.rest.stub.handlers;
-
-import java.util.List;
-import org.onap.cps.ncmp.rest.api.NetworkCmProxyApi;
-import org.onap.cps.ncmp.rest.model.CmHandleQueryParameters;
-import org.onap.cps.ncmp.rest.model.ResourceDataBatchRequest;
-import org.onap.cps.ncmp.rest.model.RestModuleDefinition;
-import org.onap.cps.ncmp.rest.model.RestModuleReference;
-import org.onap.cps.ncmp.rest.model.RestOutputCmHandle;
-import org.onap.cps.ncmp.rest.model.RestOutputCmHandleCompositeState;
-import org.onap.cps.ncmp.rest.model.RestOutputCmHandlePublicProperties;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-
-public interface NetworkCmProxyApiStubDefaultImpl extends NetworkCmProxyApi {
-
-    String ASYNC_REQUEST_ID = "requestId";
-
-    @Override
-    default ResponseEntity<Object> getResourceDataForCmHandle(final String datastoreName,
-                                                              final String cmHandle,
-                                                              final String resourceIdentifier,
-                                                              final String optionsParamInQuery,
-                                                              final String topicParamInQuery,
-                                                              final Boolean includeDescendants) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<Object> getResourceDataForCmHandleBatch(final String topicParamInQuery,
-                                                                   final ResourceDataBatchRequest
-                                                                           resourceDataBatchRequest) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<List<RestOutputCmHandle>> searchCmHandles(
-            final CmHandleQueryParameters cmHandleQueryParameters) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<Void> createResourceDataRunningForCmHandle(final String datastoreName,
-                                                                      final String resourceIdentifier,
-                                                                      final String cmHandleId,
-                                                                      final Object requestBody,
-                                                                      final String contentType) {
-        return new ResponseEntity<>(HttpStatus.CREATED);
-    }
-
-    @Override
-    default ResponseEntity<Void> deleteResourceDataRunningForCmHandle(final String datastoreName,
-                                                                      final String cmHandleId,
-                                                                      final String resourceIdentifier,
-                                                                      final String contentType) {
-        return new ResponseEntity<>(HttpStatus.NO_CONTENT);
-    }
-
-    @Override
-    default ResponseEntity<Object> setDataSyncEnabledFlagForCmHandle(final String cmHandleId,
-                                                                     final Boolean dataSyncEnabled) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<List<String>> searchCmHandleIds(final CmHandleQueryParameters cmHandleQueryParameters) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<RestOutputCmHandlePublicProperties> getCmHandlePublicPropertiesByCmHandleId(
-            final String cmHandleId) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<RestOutputCmHandleCompositeState> getCmHandleStateByCmHandleId(final String cmHandle) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<List<RestModuleDefinition>> getModuleDefinitionsByCmHandleId(final String cmHandle) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<List<RestModuleReference>> getModuleReferencesByCmHandle(final String cmHandleId) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<Object> patchResourceDataRunningForCmHandle(final String datastoreName,
-                                                                       final String resourceIdentifier,
-                                                                       final String cmHandleId,
-                                                                       final Object requestBody,
-                                                                       final String contentType) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<Object> queryResourceDataForCmHandle(final String datastoreName,
-                                                                final String cmHandle,
-                                                                final String cpsPath,
-                                                                final String optionsParamInQuery,
-                                                                final String topicParamInQuery,
-                                                                final Boolean includeDescendants) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<RestOutputCmHandle> retrieveCmHandleDetailsById(final String cmHandleId) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-
-    @Override
-    default ResponseEntity<Object> updateResourceDataRunningForCmHandle(final String datastoreName,
-                                                                        final String resourceIdentifier,
-                                                                        final String cmHandleId,
-                                                                        final Object requestBody,
-                                                                        final String contentType) {
-        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-    }
-}
diff --git a/cps-ncmp-rest-stub/src/test/java/org/onap/cps/TestApplication.java b/cps-ncmp-rest-stub/src/test/java/org/onap/cps/TestApplication.java
deleted file mode 100644 (file)
index a095edc..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *  ============LICENSE_START=======================================================
- *  Copyright (C) 2022 Bell Canada.
- *  ================================================================================
- *  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.
- *
- *  SPDX-License-Identifier: Apache-2.0
- *  ============LICENSE_END=========================================================
- */
-
-package org.onap.cps;
-
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-/**
- * The @SpringBootApplication annotated class is required in order to run tests
- * marked with @SpringBootTest annotation.
- */
-@SpringBootApplication
-public class TestApplication {
-}
index 0f58fbb..be62a4c 100755 (executable)
@@ -45,6 +45,7 @@
         <sonar.coverage.jacoco.xmlReportPaths>
             ../jacoco-report/target/site/jacoco-aggregate/jacoco.xml
         </sonar.coverage.jacoco.xmlReportPaths>
+        <parent.directory>${project.basedir}/..</parent.directory>
     </properties>
 
     <profiles>
                 </executions>
                 <configuration>
                     <executable>${script.executor}</executable>
-                    <workingDirectory>../cps-ri/src/main/resources/</workingDirectory>
+                    <workingDirectory>${parent.directory}/cps-ri/src/main/resources/</workingDirectory>
                     <arguments>
                         <argument>yangResourceCsvGenerator.py</argument>
                         <argument>dmi-registry@2021-12-13</argument>