|
21 | 21 | import org.junit.Test;
|
22 | 22 |
|
23 | 23 | import java.util.ArrayList;
|
24 |
| -import java.util.HashSet; |
| 24 | +import java.util.LinkedHashSet; |
25 | 25 | import java.util.List;
|
26 | 26 | import java.util.Set;
|
27 | 27 |
|
@@ -50,7 +50,7 @@ public void shouldReturnRoundRobin() throws Exception
|
50 | 50 | {
|
51 | 51 | // given
|
52 | 52 | RoundRobinAddressSet set = new RoundRobinAddressSet();
|
53 |
| - Set<BoltServerAddress> addresses = new HashSet<>( asList( |
| 53 | + Set<BoltServerAddress> addresses = new LinkedHashSet<>( asList( |
54 | 54 | new BoltServerAddress( "one" ),
|
55 | 55 | new BoltServerAddress( "two" ),
|
56 | 56 | new BoltServerAddress( "tre" ) ) );
|
@@ -78,7 +78,7 @@ public void shouldReturnRoundRobin() throws Exception
|
78 | 78 | public void shouldPreserveOrderWhenAdding() throws Exception
|
79 | 79 | {
|
80 | 80 | // given
|
81 |
| - HashSet<BoltServerAddress> servers = new HashSet<>( asList( |
| 81 | + Set<BoltServerAddress> servers = new LinkedHashSet<>( asList( |
82 | 82 | new BoltServerAddress( "one" ),
|
83 | 83 | new BoltServerAddress( "two" ),
|
84 | 84 | new BoltServerAddress( "tre" ) ) );
|
@@ -119,7 +119,7 @@ public void shouldPreserveOrderWhenAdding() throws Exception
|
119 | 119 | public void shouldPreserveOrderWhenRemoving() throws Exception
|
120 | 120 | {
|
121 | 121 | // given
|
122 |
| - HashSet<BoltServerAddress> servers = new HashSet<>( asList( |
| 122 | + Set<BoltServerAddress> servers = new LinkedHashSet<>( asList( |
123 | 123 | new BoltServerAddress( "one" ),
|
124 | 124 | new BoltServerAddress( "two" ),
|
125 | 125 | new BoltServerAddress( "tre" ) ) );
|
@@ -151,7 +151,7 @@ public void shouldPreserveOrderWhenRemoving() throws Exception
|
151 | 151 | public void shouldPreserveOrderWhenRemovingThroughUpdate() throws Exception
|
152 | 152 | {
|
153 | 153 | // given
|
154 |
| - HashSet<BoltServerAddress> servers = new HashSet<>( asList( |
| 154 | + Set<BoltServerAddress> servers = new LinkedHashSet<>( asList( |
155 | 155 | new BoltServerAddress( "one" ),
|
156 | 156 | new BoltServerAddress( "two" ),
|
157 | 157 | new BoltServerAddress( "tre" ) ) );
|
|
0 commit comments