Metoda próbna z typową i rozszerza typ zwracany
Czy jest możliwe wyszydzenie (z mockito) metodą podpisuSet<? extends Car> getCars()
bez ostrzeżeń próbowałem:
<code>XXX cars = xxx; when(owner.getCars()).thenReturn(cars); </code>
ale bez względu na to, jak deklarujęcars
zawsze otrzymuję błąd kompilacji. np. gdy deklaruję to w ten sposób
<code>Set<? extends Car> cars = xxx </code>
Dostaję standardowy błąd kompilacji generic / mockito
<code>The method thenReturn(Set<capture#1-of ? extends Car>) in the type OngoingStubbing<Set<capture#1-of ? extends Car>> is not applicable for the arguments (Set<capture#2-of ? extends Car>) </code>