diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-30 10:04:50 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-30 10:04:50 +0100 |
commit | 448231f18ba53edf5c0e7ab4b6732ef69328281c (patch) | |
tree | 289f528fd6adac2a39e636c449c633c26fdb838e /vespajlib/src/test/java/com/yahoo/tensor/MappedTensorTestCase.java | |
parent | 711362f17d4bbece0dc2d0833a22063374ae3e04 (diff) |
Reduce the simple usage of guava where java has caught up
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/tensor/MappedTensorTestCase.java')
-rw-r--r-- | vespajlib/src/test/java/com/yahoo/tensor/MappedTensorTestCase.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/MappedTensorTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/MappedTensorTestCase.java index ba814f7ad54..09b989e4380 100644 --- a/vespajlib/src/test/java/com/yahoo/tensor/MappedTensorTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/tensor/MappedTensorTestCase.java @@ -1,9 +1,10 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.tensor; -import com.google.common.collect.Sets; import org.junit.Test; +import java.util.Set; + import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -34,7 +35,7 @@ public class MappedTensorTestCase { Tensor tensor = Tensor.Builder.of(type). cell().label("x", "0").value(1). cell().label("x", "1").value(2).build(); - assertEquals(Sets.newHashSet("x"), tensor.type().dimensionNames()); + assertEquals(Set.of("x"), tensor.type().dimensionNames()); assertEquals("tensor(x{}):{0:1.0, 1:2.0}", tensor.toString()); } @@ -44,7 +45,7 @@ public class MappedTensorTestCase { Tensor tensor = Tensor.Builder.of(type). cell().label("x", "0").label("y", "0").value(1). cell().label("x", "1").label("y", "0").value(2).build(); - assertEquals(Sets.newHashSet("x", "y"), tensor.type().dimensionNames()); + assertEquals(Set.of("x", "y"), tensor.type().dimensionNames()); assertEquals("tensor(x{},y{}):{{x:0,y:0}:1.0, {x:1,y:0}:2.0}", tensor.toString()); } |