Skip to content

Commit

Permalink
fake
Browse files Browse the repository at this point in the history
  • Loading branch information
velo committed Jul 18, 2024
1 parent c2f8fbf commit 0de68b9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/src/test/java/feign/UtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.AssertionsForClassTypes.assertThatExceptionOfType;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.Reader;
import java.lang.reflect.Type;
import java.util.Arrays;
Expand Down Expand Up @@ -86,6 +87,16 @@ void resolveLastTypeParameterWhenNotSubtype() throws Exception {
assertThat(last).isEqualTo(listStringType);
}


@Test
void fake() throws Exception {
Type context =
LastTypeParameter.class.getDeclaredField("PARAMETERIZED_LIST_STRING").getGenericType();
Type listStringType = LastTypeParameter.class.getDeclaredField("LIST_STRING").getGenericType();
Type last = resolveLastTypeParameter(context, Parameterized.class);
assertEquals(last, listStringType);
}

@Test
void lastTypeFromInstance() throws Exception {
Parameterized<?> instance = new ParameterizedSubtype();
Expand Down

0 comments on commit 0de68b9

Please sign in to comment.