Created
August 29, 2021 21:27
-
-
Save LeMikaelF/a6ce6bd83709f7f8fa7e126cfdd4155b to your computer and use it in GitHub Desktop.
Test to reproduce Mockito issue #2409
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.junit.jupiter.api.Test; | |
import org.junit.jupiter.api.extension.ExtendWith; | |
import org.mockito.Mock; | |
import org.mockito.junit.jupiter.MockitoExtension; | |
import java.util.List; | |
import static org.assertj.core.api.Assertions.assertThat; | |
@ExtendWith(MockitoExtension.class) | |
public class DemoTest { | |
@Mock(name = "mockA") | |
private List<String> mockA; | |
@Mock(name = "mockB") | |
private List<Object> mockB; | |
@Test | |
void test() { | |
assertThat(mockA).isNotSameAs(mockB); //passes | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment