Skip to content

Commit 7ec57cc

Browse files
committed
Use LinkedHashMap for testing to preserve order
1 parent 3dd605e commit 7ec57cc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/test/java/io/tus/java/client/TestTusClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.net.HttpURLConnection;
66
import java.net.MalformedURLException;
77
import java.net.URL;
8-
import java.util.HashMap;
8+
import java.util.LinkedHashMap;
99
import java.util.Map;
1010

1111
import org.junit.After;
@@ -86,7 +86,7 @@ public void testCreateUpload() throws IOException, ProtocolException {
8686
.withHeader("Tus-Resumable", TusClient.TUS_VERSION)
8787
.withHeader("Location", mockServerURL + "/foo"));
8888

89-
Map<String, String> metadata = new HashMap<String, String>();
89+
Map<String, String> metadata = new LinkedHashMap<String, String>();
9090
metadata.put("foo", "hello");
9191
metadata.put("bar", "world");
9292

src/test/java/io/tus/java/client/TestTusUpload.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
import java.io.FileOutputStream;
77
import java.io.IOException;
88
import java.io.OutputStream;
9-
import java.util.HashMap;
9+
import java.util.LinkedHashMap;
1010
import java.util.Map;
1111

1212
public class TestTusUpload extends TestCase {
1313
public void testTusUploadFile() throws IOException {
1414
String content = "hello world";
15-
Map<String, String> metadata = new HashMap<String, String>();
15+
Map<String, String> metadata = new LinkedHashMap<String, String>();
1616
metadata.put("foo", "hello");
1717
metadata.put("bar", "world");
1818

0 commit comments

Comments
 (0)