Created
June 27, 2016 09:24
-
-
Save HennIdan/460b20bc902bf38ffc4edeed4d3323fd to your computer and use it in GitHub Desktop.
This file contains 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.runner.RunWith; | |
import org.junit.runners.JUnit4; | |
import org.mockito.Mock; | |
import org.mockito.Mockito; | |
/** | |
* Test for CannotMockFinalClass. | |
*/ | |
@RunWith(JUnit4.class) | |
public class CannotMockFinalClassPositiveCases { | |
static final class FinalClass {} | |
// BUG: Diagnostic contains: Mockito cannot mock | |
@Mock FinalClass impossible; | |
public void method() { | |
// BUG: Diagnostic contains: Mockito cannot mock | |
FinalClass local = Mockito.mock(FinalClass.class); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment