summaryrefslogtreecommitdiffstats
path: root/config-model/src/test
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-20 18:03:51 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-20 18:03:51 +0200
commit5ead1f878f50e19b67a4d7deb7dc307b43672014 (patch)
treea7cb780d1d730dffb5d403903821237c723b0e43 /config-model/src/test
parentfb3610d6c02de6393ee5f258c329c4e56f55cc65 (diff)
Simplify with streams and ImmutableMap.of
Diffstat (limited to 'config-model/src/test')
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java
index 9cf99dc5c9f..6d1028e13bc 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java
@@ -1,6 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.model.search.test;
+import com.google.common.collect.ImmutableMap;
import com.yahoo.vespa.config.search.IndexschemaConfig;
import com.yahoo.vespa.config.search.core.ProtonConfig;
import com.yahoo.vespa.config.search.RankProfilesConfig;
@@ -253,17 +254,15 @@ public class DocumentDatabaseTestCase {
@Test
public void testThatAttributesConfigIsProducedForIndexed() {
- Map<String, List<String>> expectedAttributesMap = new HashMap<>();
- expectedAttributesMap.put("type1", Arrays.asList("f2"));
assertAttributesConfigIndependentOfMode("index", Arrays.asList("type1"),
- Arrays.asList("test/search/cluster.test/type1"), expectedAttributesMap);
+ Arrays.asList("test/search/cluster.test/type1"),
+ ImmutableMap.of("type1", Arrays.asList("f2")));
}
@Test
public void testThatAttributesConfigIsProducedForStreamingForFastAccessFields() {
- Map<String, List<String>> expectedAttributesMap = new HashMap<>();
- expectedAttributesMap.put("type1", Arrays.asList("f2"));
assertAttributesConfigIndependentOfMode("streaming", Arrays.asList("type1"),
- Arrays.asList("test/search/cluster.test.type1/type1"), expectedAttributesMap);
+ Arrays.asList("test/search/cluster.test.type1/type1"),
+ ImmutableMap.of("type1", Arrays.asList("f2")));
}
@Test
public void testThatAttributesConfigIsNotProducedForStoreOnlyEvenForFastAccessFields() {