Skip to content

Commit 0de68b9

Browse files
committed
fake
1 parent c2f8fbf commit 0de68b9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

core/src/test/java/feign/UtilTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static org.assertj.core.api.Assertions.assertThat;
2121
import static org.assertj.core.api.Assertions.assertThatThrownBy;
2222
import static org.assertj.core.api.AssertionsForClassTypes.assertThatExceptionOfType;
23+
import static org.junit.jupiter.api.Assertions.assertEquals;
2324
import java.io.Reader;
2425
import java.lang.reflect.Type;
2526
import java.util.Arrays;
@@ -86,6 +87,16 @@ void resolveLastTypeParameterWhenNotSubtype() throws Exception {
8687
assertThat(last).isEqualTo(listStringType);
8788
}
8889

90+
91+
@Test
92+
void fake() throws Exception {
93+
Type context =
94+
LastTypeParameter.class.getDeclaredField("PARAMETERIZED_LIST_STRING").getGenericType();
95+
Type listStringType = LastTypeParameter.class.getDeclaredField("LIST_STRING").getGenericType();
96+
Type last = resolveLastTypeParameter(context, Parameterized.class);
97+
assertEquals(last, listStringType);
98+
}
99+
89100
@Test
90101
void lastTypeFromInstance() throws Exception {
91102
Parameterized<?> instance = new ParameterizedSubtype();

0 commit comments

Comments
 (0)