Skip to main content
  • Log in
  • Manage Cookies
EclipseCon - Eclipse Foundation
  • Conference
    • Program Schedule
    • Program List
    • Registration
  • Features
    • Community Day
    • Hacker Day
    • Dinner Meetups
    • OSGi Summit
    • Keynotes
  • Community
    • Code of Conduct
    • Health & Safety at EclipseCon
    • Community Resources
    • 2022 Speakers
    • Information for Speakers
  • Sponsors
    • Be a Sponsor
    • Information for Exhibitors
    • Our Sponsors
    • Sponsor Testimonials
  • Venue
    • Conference Venue
    • Hotels
    • Ludwigsburg
  • About Us
    • EclipseCon 2022
    • Program Committee
    • The Eclipse Foundation
    • Past Conferences
    • Other Events
  1. Home
  2. EclipseCon
  3. EclipseCon 2022
  4. Sessions
  5. PowerMock is a Painkiller, Ports & Adapters is the Cure

PowerMock is a Painkiller, Ports & Adapters is the Cure

Session details
Status: 
Declined
Speaker(s): 
Gopal S Akshintala (Salesforce.com)
Experience level: 
Beginner
Tags: 
PowerMock
Ports & Adapters
Clean Architecture
Unit testing
Session Track: 
Java
Session Type: 
Standard

Audience

This applies to software developers at all levels interested in good Software Architecture. I use Java code snippets for demonstration. PowerMock may be specific to the JVM ecosystem, but there may be analogous tools in other eco systems. Ports & Adapters is a language-agnostic architectural pattern.

Takeaways

  • Not a Test-Pyramid talk!
  • Learn how the need to use Invasive tools like PowerMock literally mock at the OO principles like Encapsulation, through hands-on demonstration.
  • What are some of the Anti-pattern traps that force devs to depend on PowerMock and how to avoid them.
  • Let's discuss Ports & Adapters architecture and understand how it eases Testing the Domain logic, without the need to bend the byte-code with invasive tools like PowerMock.

Links

Loki won the hackathon in Salesforce and many teams are using it successfully to prevent PowerMock and write quality unit-tests.

  • Hackathon pitch video: https://youtu.be/daiNyNDdj7g

(The video may have few salesforce specific content but the talk won't have those and it is generic to all).

Objective of the presentation: 
PowerMock is often used to bend the Object-(Dis)Orientation for inflated code-coverage numbers, but it incubates the actual design ailment, which grows as your codebase grows. **Ports & Adapters aka Clean Architecture** is the *right* way to treat it. Let's discuss this architectural pattern and how: - It let’s you unit test domain logic in isolation, which organically boosts test coverage - It’s transparent and declarative, so the tests written using this pattern are easy to maintain - It acts as a framework to enforce appropriate DI and promote clean OO
Attendee pre-requisites - If none, enter "N/A": 
N/A
  • Sign in to post comments.

Elite

  • IBM
  • Huawei

Premium

  • Red Hat
  • Eurotech
  • Yatta Solutions GmbH

Basic

  • Bosch IO GmbH
  • EclipseSource
  • SCANOSS
  • Mercedes-Benz Tech Innovation
  • ARCAD Software
  • Obeo
  • TypeFox GmbH
  • SSI Schaefer IT Solutions GmbH

Media

  • GermanTechJobs

Become a Sponsor

Eclipse Foundation

  • About Us
  • Contact Us
  • Sponsor
  • Members
  • Governance
  • Code of Conduct
  • Logo and Artwork
  • Board of Directors
  • Careers

Legal

  • Privacy Policy
  • Terms of Use
  • Copyright Agent
  • Eclipse Public License
  • Legal Resources

Useful Links

  • Report a Bug
  • Documentation
  • How to Contribute
  • Mailing Lists
  • Forums
  • Marketplace
EclipseCon is brought to you by The Eclipse Foundation with the support of our sponsors.
Powered by Drupal and built on COD.

Copyright © Eclipse Foundation. All Rights Reserved.

Back to the top