From 492ff5b88816f5c852e5c41ec1b081b16181c982 Mon Sep 17 00:00:00 2001 From: Dhawal Kapil Date: Wed, 31 May 2023 23:38:48 +0530 Subject: [PATCH] JAVA-13721 Removed mockmaker file, not needed with mockito v5+ --- .../mockito/mockfinal/MockFinalsUnitTest.java | 12 ------------ .../mockito-extensions/org.mockito.plugins.MockMaker | 1 - 2 files changed, 13 deletions(-) delete mode 100644 testing-modules/mockito-simple/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker diff --git a/testing-modules/mockito-simple/src/test/java/com/baeldung/mockito/mockfinal/MockFinalsUnitTest.java b/testing-modules/mockito-simple/src/test/java/com/baeldung/mockito/mockfinal/MockFinalsUnitTest.java index 6041ee1a9b..705f2ac7ad 100644 --- a/testing-modules/mockito-simple/src/test/java/com/baeldung/mockito/mockfinal/MockFinalsUnitTest.java +++ b/testing-modules/mockito-simple/src/test/java/com/baeldung/mockito/mockfinal/MockFinalsUnitTest.java @@ -3,10 +3,8 @@ package com.baeldung.mockito.mockfinal; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.mockito.Mockito.withSettings; import org.junit.jupiter.api.Test; -import org.mockito.MockMakers; import com.baeldung.mockito.FinalList; import com.baeldung.mockito.MyList; @@ -30,14 +28,4 @@ class MockFinalsUnitTest { assertThat(mock.size()).isNotEqualTo(1); } - - @Test - public void whenMockFinalMethodMockWorks_withInlineMockMaker() { - MyList myList = new MyList(); - - MyList mock = mock(MyList.class, withSettings().mockMaker(MockMakers.INLINE)); - when(mock.finalMethod()).thenReturn(1); - - assertThat(mock.finalMethod()).isNotEqualTo(myList.finalMethod()); - } } diff --git a/testing-modules/mockito-simple/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/testing-modules/mockito-simple/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker deleted file mode 100644 index ca6ee9cea8..0000000000 --- a/testing-modules/mockito-simple/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker +++ /dev/null @@ -1 +0,0 @@ -mock-maker-inline \ No newline at end of file