aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAISearchNodeQueryNonEmptyResult.java
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAISearchNodeQueryNonEmptyResult.java')
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAISearchNodeQueryNonEmptyResult.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAISearchNodeQueryNonEmptyResult.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAISearchNodeQueryNonEmptyResult.java
new file mode 100644
index 000000000..29e7d5092
--- /dev/null
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAISearchNodeQueryNonEmptyResult.java
@@ -0,0 +1,46 @@
+package org.onap.simulator.presetGenerator.presets.aai;
+
+import com.google.common.collect.ImmutableMap;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public class PresetAAISearchNodeQueryNonEmptyResult extends PresetAAIBaseSearchNodeQuery {
+
+ private final String type;
+ private final String name;
+
+ public PresetAAISearchNodeQueryNonEmptyResult(String type, String name) {
+ this.type = type;
+ this.name = name;
+ }
+
+ @Override
+ public Object getResponseBody() {
+ return "{ \"something\": [] }";
+ }
+
+ @Override
+ public int getResponseCode() {
+ return 200;
+ }
+
+ @Override
+ public String getReqPath() {
+ return getRootPath() + "/nodes/" + searchPath();
+ }
+
+ @Override
+ public Map<String, List> getQueryParams() {
+ return ImmutableMap.of(searchKey(), Collections.singletonList(name));
+ }
+
+ private String searchPath() {
+ return type + "s";
+ }
+
+ private String searchKey() {
+ return type + "-name";
+ }
+}