File tree 1 file changed +2
-2
lines changed
1-0-java-basics/1-3-1-crazy-generics/src/test/java/com/bobocode/basics
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ void maxHolderClassTypeParameterShouldBeBoundByComparableT() {
187
187
var typeParam = typeParameters [0 ];
188
188
var boundType = typeParam .getBounds ()[0 ];
189
189
190
- var expectedBoundTypeName = String .format ("%s<%s>" , Comparable .class .getTypeName (), TYPE_PARAMETER_NAME );
190
+ var expectedBoundTypeName = String .format ("%s<? super %s>" , Comparable .class .getTypeName (), TYPE_PARAMETER_NAME );
191
191
assertThat (boundType .getTypeName ()).isEqualTo (expectedBoundTypeName );
192
192
}
193
193
@@ -295,7 +295,7 @@ void strictProcessorTypeParameterIsBoundBySerializableAndComparable() {
295
295
assertThat (serializableBoundType .getTypeName ())
296
296
.isEqualTo (Serializable .class .getTypeName ());
297
297
assertThat (comparableBoundType .getTypeName ())
298
- .isEqualTo (String .format ("%s<%s>" , Comparable .class .getTypeName (), TYPE_PARAMETER_NAME ));
298
+ .isEqualTo (String .format ("%s<? super %s>" , Comparable .class .getTypeName (), TYPE_PARAMETER_NAME ));
299
299
}
300
300
301
301
@ Test
You can’t perform that action at this time.
0 commit comments