SlideShare a Scribd company logo
1 of 30
Unit test your *LocalServiceImpl
classes
Professional Service Manager Brazil
Thiago Moreira
Content
●
Why test LocalServiceImpl classes?
●
Past attempts to test
●
Easy things to test
●
What is EasyMock and PowerMock?
●
Complex things to test
●
Mocking static methods
Why unit test *LocalServiceImpl classes?
Past attempts to test *LSImpl
We didn't automate tests at all
Past attempts to test *LSImpl
Integrated tests
Past attempts to test *LSImpl
●
Implemented all interfaces that were dependencies in a
given LocalServiceImpl
●
MockUserLocalService, MockPortal, MockIndexerRegistry
●
Created a project called portal-test
Sample application
●
Project based on Maven
●
One entity called BeerDrinker (name and alcoholLevel fields)
●
Workflow enabled
●
Class in test BeerDrinkerLocalServiceImpl referenced as just
impl.
●
Test class BeerDrinkerLocalServiceImplTest
●
Code available in
github.com/tmoreira2020/liferay-service-builder-unit-testable
Easy things to test first
Easy things to test first
Easy things to test first
Refactoring
Next step
●
Increment complexity
●
EasyMock/PowerMock
What is EasyMock?
“EasyMock provides Mock Objects for interfaces (and objects
through the class extension) by generating them on the fly
using Java's proxy mechanism. Due to EasyMock's unique
style of recording expectations, most refactorings will not
affect the Mock Objects. So EasyMock is a perfect fit for Test-
Driven Development.”
What is PowerMock?
“PowerMock is a framework that extend other mock libraries
such as EasyMock with more powerful capabilities.
PowerMock uses a custom classloader and bytecode
manipulation to enable mocking of static methods,
constructors, final classes and methods, private methods,
removal of static initializers and more.”
What is EasyMock/PowerMock?
My opinion: EasyMock and PowerMock are the swiss army
knife for unit testing.
What is EasyMock/PowerMock?
Set
expectations
Create Mock VerifyTest
Set ready
(replay)
Complex things to test
Complex things to test
CounterLocalService
Create the mock
CounterLocalService counterLocalService =
createNiceMock(CounterLocalService.class);
Set expectations
String className = BeerDrinker.class.getName();
expect(counterLocalService.increment(className)).andRe
turn(beerDrinkerId);
Switch to replay mode
replay(counterLocalService);
Set the mock object in impl class
impl.setCounterLocalService(counterLocalService);
Verify
verify(counterLocalService);
Mocking static methods
Enabling workflow
Adding annotations
Testing workflow
Challenges
●
Culture
●
Lack of documentation/articles
●
Verbosity
thiago.moreira@liferay.com
@tmoreira2020
thiago.moreira@liferay.com
@tmoreira2020
Thank you

More Related Content

What's hot

Continuous Delivery in Practice (extended)
Continuous Delivery in Practice (extended)Continuous Delivery in Practice (extended)
Continuous Delivery in Practice (extended)Tzach Zohar
 
Android clean architecture workshop 3h edition
Android clean architecture workshop 3h editionAndroid clean architecture workshop 3h edition
Android clean architecture workshop 3h editionJorge Ortiz
 
Mozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10nMozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10nHenrik Skupin
 
Introduction to K6
Introduction to K6Introduction to K6
Introduction to K6Knoldus Inc.
 
Continuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatlingContinuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatlingTim van Eijndhoven
 
2.3 (Architecture) Moving to Managed Code
2.3   (Architecture) Moving to Managed Code2.3   (Architecture) Moving to Managed Code
2.3 (Architecture) Moving to Managed CodeMicro Focus
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance WorkshopSai Krishna
 
Karate, the black belt of HTTP API testing?
Karate, the black belt of HTTP API testing?Karate, the black belt of HTTP API testing?
Karate, the black belt of HTTP API testing?Bertrand Delacretaz
 
Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016XP Conference India
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...COMAQA.BY
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonIneke Scheffers
 
API Test Automation Using Karate (Anil Kumar Moka)
API Test Automation Using Karate (Anil Kumar Moka)API Test Automation Using Karate (Anil Kumar Moka)
API Test Automation Using Karate (Anil Kumar Moka)Peter Thomas
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingMeetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingAugusto Lazaro
 
Accelerate Quality with Postman Advance
Accelerate Quality with Postman AdvanceAccelerate Quality with Postman Advance
Accelerate Quality with Postman AdvanceKnoldus Inc.
 
Getting started with karate dsl
Getting started with karate dslGetting started with karate dsl
Getting started with karate dslKnoldus Inc.
 
Boost your App with Gatling
Boost your App with GatlingBoost your App with Gatling
Boost your App with GatlingKnoldus Inc.
 
GitHub as a Landing Page
GitHub as a Landing Page GitHub as a Landing Page
GitHub as a Landing Page Pronovix
 

What's hot (20)

Continuous Delivery in Practice (extended)
Continuous Delivery in Practice (extended)Continuous Delivery in Practice (extended)
Continuous Delivery in Practice (extended)
 
Gatling
Gatling Gatling
Gatling
 
Android clean architecture workshop 3h edition
Android clean architecture workshop 3h editionAndroid clean architecture workshop 3h edition
Android clean architecture workshop 3h edition
 
Mozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10nMozilla: Mozmill meets L10n
Mozilla: Mozmill meets L10n
 
Introduction to K6
Introduction to K6Introduction to K6
Introduction to K6
 
Continuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatlingContinuous performance: Load testing for developers with gatling
Continuous performance: Load testing for developers with gatling
 
2.3 (Architecture) Moving to Managed Code
2.3   (Architecture) Moving to Managed Code2.3   (Architecture) Moving to Managed Code
2.3 (Architecture) Moving to Managed Code
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
 
Wax on, wax off
Wax on, wax offWax on, wax off
Wax on, wax off
 
Karate, the black belt of HTTP API testing?
Karate, the black belt of HTTP API testing?Karate, the black belt of HTTP API testing?
Karate, the black belt of HTTP API testing?
 
Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomon
 
API Test Automation Using Karate (Anil Kumar Moka)
API Test Automation Using Karate (Anil Kumar Moka)API Test Automation Using Karate (Anil Kumar Moka)
API Test Automation Using Karate (Anil Kumar Moka)
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingMeetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React Testing
 
Accelerate Quality with Postman Advance
Accelerate Quality with Postman AdvanceAccelerate Quality with Postman Advance
Accelerate Quality with Postman Advance
 
Getting started with karate dsl
Getting started with karate dslGetting started with karate dsl
Getting started with karate dsl
 
Boost your App with Gatling
Boost your App with GatlingBoost your App with Gatling
Boost your App with Gatling
 
GitHub as a Landing Page
GitHub as a Landing Page GitHub as a Landing Page
GitHub as a Landing Page
 
Itb2018 integrating mvc into legacy
Itb2018   integrating mvc into legacyItb2018   integrating mvc into legacy
Itb2018 integrating mvc into legacy
 

Similar to Unit test your *LocalServiceImpl classes

Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperMike Melusky
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperMike Melusky
 
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Sauce Labs
 
Unit Test Android Without Going Bald
Unit Test Android Without Going BaldUnit Test Android Without Going Bald
Unit Test Android Without Going BaldDavid Carver
 
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...DicodingEvent
 
Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Sam Becker
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPhil Leggetter
 
Loggly - 5 Popular .NET Logging Libraries
Loggly - 5 Popular .NET Logging LibrariesLoggly - 5 Popular .NET Logging Libraries
Loggly - 5 Popular .NET Logging LibrariesSolarWinds Loggly
 
Unit Test your Views
Unit Test your ViewsUnit Test your Views
Unit Test your ViewsJorge Ortiz
 
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...mfrancis
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code cleanBrett Child
 
An almost complete continuous delivery pipeline including configuration manag...
An almost complete continuous delivery pipeline including configuration manag...An almost complete continuous delivery pipeline including configuration manag...
An almost complete continuous delivery pipeline including configuration manag...ulfmansson
 
Practical Software Testing Tools
Practical Software Testing ToolsPractical Software Testing Tools
Practical Software Testing ToolsDr Ganesh Iyer
 

Similar to Unit test your *LocalServiceImpl classes (20)

Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
 
Effective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and DapperEffective .NET Core Unit Testing with SQLite and Dapper
Effective .NET Core Unit Testing with SQLite and Dapper
 
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
 
Unit Test Android Without Going Bald
Unit Test Android Without Going BaldUnit Test Android Without Going Bald
Unit Test Android Without Going Bald
 
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
 
Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8
 
Qtpppt1
Qtpppt1Qtpppt1
Qtpppt1
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
 
Loggly - 5 Popular .NET Logging Libraries
Loggly - 5 Popular .NET Logging LibrariesLoggly - 5 Popular .NET Logging Libraries
Loggly - 5 Popular .NET Logging Libraries
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Unit Test your Views
Unit Test your ViewsUnit Test your Views
Unit Test your Views
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...
iPOJO - The Simple Life - Richard Hall, Visiting Assistant Professor at Tufts...
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code clean
 
An almost complete continuous delivery pipeline including configuration manag...
An almost complete continuous delivery pipeline including configuration manag...An almost complete continuous delivery pipeline including configuration manag...
An almost complete continuous delivery pipeline including configuration manag...
 
Practical Software Testing Tools
Practical Software Testing ToolsPractical Software Testing Tools
Practical Software Testing Tools
 

More from Thiago Leão Moreira

Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?
Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?
Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?Thiago Leão Moreira
 
How to push to production a project with 100+ plugins in less than 10 minutes
How to push to production a project with 100+ plugins in less than 10 minutes How to push to production a project with 100+ plugins in less than 10 minutes
How to push to production a project with 100+ plugins in less than 10 minutes Thiago Leão Moreira
 

More from Thiago Leão Moreira (8)

Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?
Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?
Liferay DEVCON 2023 - What's cooking in Liferay's Cloud?
 
Novidades do Liferay Portal 6.2
Novidades do Liferay Portal 6.2Novidades do Liferay Portal 6.2
Novidades do Liferay Portal 6.2
 
How to push to production a project with 100+ plugins in less than 10 minutes
How to push to production a project with 100+ plugins in less than 10 minutes How to push to production a project with 100+ plugins in less than 10 minutes
How to push to production a project with 100+ plugins in less than 10 minutes
 
Novas Funcionalidades Liferay 6
Novas Funcionalidades Liferay 6Novas Funcionalidades Liferay 6
Novas Funcionalidades Liferay 6
 
Floggy-M3DD-2009-01-21
Floggy-M3DD-2009-01-21Floggy-M3DD-2009-01-21
Floggy-M3DD-2009-01-21
 
Floggy-JustJava-2008-09-10
Floggy-JustJava-2008-09-10Floggy-JustJava-2008-09-10
Floggy-JustJava-2008-09-10
 
Floggy-GUJavaSC-2008-09-20
Floggy-GUJavaSC-2008-09-20Floggy-GUJavaSC-2008-09-20
Floggy-GUJavaSC-2008-09-20
 
Floggy-IIBoot-2008-09-25
Floggy-IIBoot-2008-09-25Floggy-IIBoot-2008-09-25
Floggy-IIBoot-2008-09-25
 

Recently uploaded

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Unit test your *LocalServiceImpl classes

Editor's Notes

  1. The flux capacitor
  2. Bugs in production
  3. - Selenium scripts - Too many points to break - complex setup
  4. - start doing easy thing - to no be demotivated - my girlfriend is driving me crazy to buy a dog and we live in an apartment. This won't work except if the dogs helps me to test
  5. - so what is easy to test in a *LocalServiceImpl class? - parameters - don't need fancy test frameworks to test it - plain junit do the job
  6. Black magic
  7. - you can do wherever you need with it to
  8. I would say that hard is the learning process.
  9. - need to mock all the LocalService and Persistence interfaces
  10. - one of the great characteristics of Liferay's API is the use of classes with a bunch of static methods.