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 28824f0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion core/src/test/java/feign/UtilTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 The Feign Authors
* Copyright 2012-2024 The Feign Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
Expand All @@ -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 28824f0

Please sign in to comment.