You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Stein (JIRA)" <ji...@apache.org> on 2018/05/12 08:38:00 UTC
[jira] [Commented] (SUREFIRE-1521) Replace PowerMock usage
[ https://issues.apache.org/jira/browse/SUREFIRE-1521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472985#comment-16472985 ]
Christian Stein commented on SUREFIRE-1521:
-------------------------------------------
Perhaps use Mockito 2 support for mocking `final` classes?
_"Redesign your code, or use Powermock. And the latter is almost never a good thing."_
Source: [https://igorski.co/java/testing/mock-final-classes-mockito/]
> Replace PowerMock usage
> -----------------------
>
> Key: SUREFIRE-1521
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1521
> Project: Maven Surefire
> Issue Type: Task
> Reporter: Christian Stein
> Priority: Minor
> Attachments: image-2018-05-08-20-03-42-257.png
>
>
> PowerMock seems not actively maintained. With the upcoming release of Java 11 this will lead to problems. As can be seen here: https://github.com/powermock/powermock/issues/904
> We should replace the usage of it in only *4* of Surefires' tests by using `mockito`, if possible. Or don't mock here at all and achieve the same test goals by using the real domain model types.
>
> !image-2018-05-08-20-03-42-257.png!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)