2727import feign .jackson .JacksonEncoder ;
2828import java .io .File ;
2929import java .nio .file .Files ;
30- import java .nio .file .Paths ;
30+ import java .nio .file .Path ;
3131import java .util .Arrays ;
3232import java .util .Map ;
3333import lombok .val ;
@@ -61,7 +61,7 @@ void testFormException() {
6161 @ Test
6262 void testUpload () throws Exception {
6363 val path =
64- Paths . get (Thread .currentThread ().getContextClassLoader ().getResource ("file.txt" ).toURI ());
64+ Path . of (Thread .currentThread ().getContextClassLoader ().getResource ("file.txt" ).toURI ());
6565 assertThat (path ).exists ();
6666
6767 assertThat (API .upload (path .toFile ())).asLong ().isEqualTo (Files .size (path ));
@@ -70,7 +70,7 @@ void testUpload() throws Exception {
7070 @ Test
7171 void testUploadWithParam () throws Exception {
7272 val path =
73- Paths . get (Thread .currentThread ().getContextClassLoader ().getResource ("file.txt" ).toURI ());
73+ Path . of (Thread .currentThread ().getContextClassLoader ().getResource ("file.txt" ).toURI ());
7474 assertThat (path ).exists ();
7575
7676 assertThat (API .upload (10 , Boolean .TRUE , path .toFile ())).asLong ().isEqualTo (Files .size (path ));
@@ -94,11 +94,11 @@ void testQueryMap() {
9494 @ Test
9595 void testMultipleFilesArray () throws Exception {
9696 val path1 =
97- Paths . get (Thread .currentThread ().getContextClassLoader ().getResource ("file.txt" ).toURI ());
97+ Path . of (Thread .currentThread ().getContextClassLoader ().getResource ("file.txt" ).toURI ());
9898 assertThat (path1 ).exists ();
9999
100100 val path2 =
101- Paths . get (
101+ Path . of (
102102 Thread .currentThread ().getContextClassLoader ().getResource ("another_file.txt" ).toURI ());
103103 assertThat (path2 ).exists ();
104104
@@ -110,11 +110,11 @@ void testMultipleFilesArray() throws Exception {
110110 @ Test
111111 void testMultipleFilesList () throws Exception {
112112 val path1 =
113- Paths . get (Thread .currentThread ().getContextClassLoader ().getResource ("file.txt" ).toURI ());
113+ Path . of (Thread .currentThread ().getContextClassLoader ().getResource ("file.txt" ).toURI ());
114114 assertThat (path1 ).exists ();
115115
116116 val path2 =
117- Paths . get (
117+ Path . of (
118118 Thread .currentThread ().getContextClassLoader ().getResource ("another_file.txt" ).toURI ());
119119 assertThat (path2 ).exists ();
120120
@@ -128,7 +128,7 @@ void testUploadWithDto() throws Exception {
128128 val dto = new Dto ("Artem" , 11 );
129129
130130 val path =
131- Paths . get (Thread .currentThread ().getContextClassLoader ().getResource ("file.txt" ).toURI ());
131+ Path . of (Thread .currentThread ().getContextClassLoader ().getResource ("file.txt" ).toURI ());
132132 assertThat (path ).exists ();
133133
134134 assertThat (API .uploadWithDto (dto , path .toFile ()))
@@ -140,7 +140,7 @@ void testUploadWithDto() throws Exception {
140140 @ Test
141141 void testUnknownTypeFile () throws Exception {
142142 val path =
143- Paths . get (Thread .currentThread ().getContextClassLoader ().getResource ("file.abc" ).toURI ());
143+ Path . of (Thread .currentThread ().getContextClassLoader ().getResource ("file.abc" ).toURI ());
144144 assertThat (path ).exists ();
145145
146146 assertThat (API .uploadUnknownType (path .toFile ())).isEqualTo ("application/octet-stream" );
0 commit comments