blob: 29e7d5092a8105c03fabc12d8f91a0d64bfcd7d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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";
}
}
|