SlideShare a Scribd company logo
1 of 25
simple testable code Félix-Étienne Trépanier developer   @wajam http://musicdrivendevelopment.com
_why? ,[object Object],[object Object],[object Object]
ingredients not recipe ,[object Object]
coding process ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object]
what and how ,[object Object],[object Object]
[object Object],focus on...
core values ,[object Object],[object Object],[object Object],[object Object]
simple code ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
clean code no duplicate code precise and explicit consistent single purpose artifacts
simple code ,[object Object],[object Object],[object Object]
references ,[object Object],[object Object],[object Object]
refactoring can save you by @alex_normand
test in isolation ,[object Object],[object Object],[object Object]
all about dependencies ,[object Object],[object Object]
 
static dependencies ,[object Object],[object Object],[object Object]
test code paradox ,[object Object]
test code is code! ,[object Object],[object Object]
use the right test object ,[object Object],[object Object],[object Object]
assert behavior not implementation ,[object Object],[object Object],[object Object],[object Object]
easy with EasyMock
assert only what is needed
stateless ,[object Object],[object Object],[object Object],[object Object]
summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Introducing TDD to your project
Introducing TDD to your projectIntroducing TDD to your project
Introducing TDD to your projectBastian Feder
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit TestingShaun Abram
 
Code Review
Code ReviewCode Review
Code ReviewDivante
 
Unit testing - the hard parts
Unit testing - the hard partsUnit testing - the hard parts
Unit testing - the hard partsShaun Abram
 
Unit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and MoqUnit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and MoqXPDays
 
TDD- Test Driven Development
TDD- Test Driven DevelopmentTDD- Test Driven Development
TDD- Test Driven DevelopmentLiza Antoun
 
Mock driven development using .NET
Mock driven development using .NETMock driven development using .NET
Mock driven development using .NETPuneet Ghanshani
 
Code review guidelines
Code review guidelinesCode review guidelines
Code review guidelinesLalit Kale
 
Alexandru Bolboaca - Unit Testing from the Trenches
Alexandru Bolboaca - Unit Testing from the TrenchesAlexandru Bolboaca - Unit Testing from the Trenches
Alexandru Bolboaca - Unit Testing from the TrenchesMozaic Works
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And MockingJoe Wilson
 
Beyond Unit Testing
Beyond Unit TestingBeyond Unit Testing
Beyond Unit TestingSøren Lund
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript ApplicationsMuhammad Samu
 
Nguyenvandungb seminar
Nguyenvandungb seminarNguyenvandungb seminar
Nguyenvandungb seminardunglinh111
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolatorMaslowB
 

What's hot (20)

Introducing TDD to your project
Introducing TDD to your projectIntroducing TDD to your project
Introducing TDD to your project
 
Code Review
Code ReviewCode Review
Code Review
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit Testing
 
Code review at large scale
Code review at large scaleCode review at large scale
Code review at large scale
 
Code Review
Code ReviewCode Review
Code Review
 
Testing 101: Three Rules for Testing at Ombu Labs
Testing 101: Three Rules for Testing at Ombu Labs Testing 101: Three Rules for Testing at Ombu Labs
Testing 101: Three Rules for Testing at Ombu Labs
 
Unit testing - the hard parts
Unit testing - the hard partsUnit testing - the hard parts
Unit testing - the hard parts
 
Unit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and MoqUnit Testing in Action - C#, NUnit, and Moq
Unit Testing in Action - C#, NUnit, and Moq
 
TDD- Test Driven Development
TDD- Test Driven DevelopmentTDD- Test Driven Development
TDD- Test Driven Development
 
Mock driven development using .NET
Mock driven development using .NETMock driven development using .NET
Mock driven development using .NET
 
Code Review
Code ReviewCode Review
Code Review
 
Code review guidelines
Code review guidelinesCode review guidelines
Code review guidelines
 
Alexandru Bolboaca - Unit Testing from the Trenches
Alexandru Bolboaca - Unit Testing from the TrenchesAlexandru Bolboaca - Unit Testing from the Trenches
Alexandru Bolboaca - Unit Testing from the Trenches
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Beyond Unit Testing
Beyond Unit TestingBeyond Unit Testing
Beyond Unit Testing
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript Applications
 
Nguyenvandungb seminar
Nguyenvandungb seminarNguyenvandungb seminar
Nguyenvandungb seminar
 
AspectMock
AspectMockAspectMock
AspectMock
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 

Viewers also liked

Problem Solving Protocols
Problem Solving ProtocolsProblem Solving Protocols
Problem Solving Protocolsigualproject
 
Test ...your cognitive biases! v1
Test ...your cognitive biases! v1Test ...your cognitive biases! v1
Test ...your cognitive biases! v1Oana Juncu
 
Overview of the WJ IV Cognitive Battery: GIA and CHC Clusters
Overview of the WJ IV Cognitive Battery: GIA and CHC ClustersOverview of the WJ IV Cognitive Battery: GIA and CHC Clusters
Overview of the WJ IV Cognitive Battery: GIA and CHC ClustersKevin McGrew
 
Jean Piaget's Theory of Cognitive Development
Jean Piaget's Theory of Cognitive DevelopmentJean Piaget's Theory of Cognitive Development
Jean Piaget's Theory of Cognitive DevelopmentKelly McGrail
 
10 Things your Audience Hates About your Presentation
10 Things your Audience Hates About your Presentation10 Things your Audience Hates About your Presentation
10 Things your Audience Hates About your PresentationStinson
 
The Art of the Presentation
The Art of the PresentationThe Art of the Presentation
The Art of the PresentationJeffrey Stevens
 

Viewers also liked (6)

Problem Solving Protocols
Problem Solving ProtocolsProblem Solving Protocols
Problem Solving Protocols
 
Test ...your cognitive biases! v1
Test ...your cognitive biases! v1Test ...your cognitive biases! v1
Test ...your cognitive biases! v1
 
Overview of the WJ IV Cognitive Battery: GIA and CHC Clusters
Overview of the WJ IV Cognitive Battery: GIA and CHC ClustersOverview of the WJ IV Cognitive Battery: GIA and CHC Clusters
Overview of the WJ IV Cognitive Battery: GIA and CHC Clusters
 
Jean Piaget's Theory of Cognitive Development
Jean Piaget's Theory of Cognitive DevelopmentJean Piaget's Theory of Cognitive Development
Jean Piaget's Theory of Cognitive Development
 
10 Things your Audience Hates About your Presentation
10 Things your Audience Hates About your Presentation10 Things your Audience Hates About your Presentation
10 Things your Audience Hates About your Presentation
 
The Art of the Presentation
The Art of the PresentationThe Art of the Presentation
The Art of the Presentation
 

Similar to Simple testable code

Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionPyxis Technologies
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven DevelopmentMichael Denomy
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development CodeOps Technologies LLP
 
Unit Testing Full@
Unit Testing Full@Unit Testing Full@
Unit Testing Full@Alex Borsuk
 
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learnedSwiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learnedMichael Palotas
 
Unit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking SkeletonUnit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking SkeletonSeb Rose
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In ActionJon Kruger
 
Test driven development
Test driven developmentTest driven development
Test driven developmentnamkha87
 
Assessing Unit Test Quality
Assessing Unit Test QualityAssessing Unit Test Quality
Assessing Unit Test Qualityguest268ee8
 
Unit Testing Fundamentals
Unit Testing FundamentalsUnit Testing Fundamentals
Unit Testing FundamentalsRichard Paul
 

Similar to Simple testable code (20)

Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
 
TestDrivenDeveloment
TestDrivenDevelomentTestDrivenDeveloment
TestDrivenDeveloment
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 
Unit testing
Unit testingUnit testing
Unit testing
 
TDD Best Practices
TDD Best PracticesTDD Best Practices
TDD Best Practices
 
Testing 101
Testing 101Testing 101
Testing 101
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Unit Testing Full@
Unit Testing Full@Unit Testing Full@
Unit Testing Full@
 
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learnedSwiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
Swiss Testing Day - Testautomation, 10 (sometimes painful) lessons learned
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Why unit testingl
Why unit testinglWhy unit testingl
Why unit testingl
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Unit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking SkeletonUnit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking Skeleton
 
Test-Driven Development In Action
Test-Driven Development In ActionTest-Driven Development In Action
Test-Driven Development In Action
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Assessing Unit Test Quality
Assessing Unit Test QualityAssessing Unit Test Quality
Assessing Unit Test Quality
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
 
Unit Testing Fundamentals
Unit Testing FundamentalsUnit Testing Fundamentals
Unit Testing Fundamentals
 

Recently uploaded

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
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
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
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
 
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsFact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsZilliz
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesSanjay Willie
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
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
 

Recently uploaded (20)

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
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
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
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
 
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsFact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
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
 

Simple testable code

Editor's Notes

  1. How it all started...I was doing TDD and felt that my code could have been simpler. So I started to think about how to make simpler code while still being able to unit test it. Started a few months ago, so still work in progress, but I want to share what I have concluded so far. Who does refactoring? Who does unit testing? Who does TDD?
  2. Software evolves. You will have to go back to the crappy code. Simplicity and testability for maintainability. For fun!
  3. As I mentioned, I was doing TDD and was not very satisfied with the results. I'm not saying that TDD is bad, but I want to highlight some problems I have with TDD: Tests direct the design...but is it the simplest design or is it a local minima. Unit tests are often seen as a substitute for thinking...I need to change this, let's change it, check if anything is broken. Unit tests are safety nets, but they have holes...better not to fall. It is not because you are doing TDD that you write good code. TDD with bad test code is dangerous.
  4.   Starting point for the reflection.
  5. Clean Code is good, but sometimes goes too far. Clean code is more about rules than mindset. I have a problem with the whole software craftmanship...you are not doing TDD then you are not a professional programmer. So I warn you, I'm not a professional programmer, but still getting paid to program.
  6. You chose not to go the the session on refactoring...there you go all you need to know :) Writing simple code is good. Evolving simple code is not as easy. That is were refactoring comes into play. Refactoring plays a role in keeping the code simple after each evolution. Unit tests allows refactoring with a safety net. So we need unit tests!
  7. Why test in isolation? control: the option to provoke some hard to produce scenarios in real life. to test edge cases. stability: want to investigate real test failures. So we want to test class in isolation...how do we isolate?
  8. Show dependencies. Show testable version. Show unit test.
  9. That explains why test code can slow down. Test code is fragile! Can we write better tests...tests that would not have to change everytime the production code changes. Test code has to be coupled with the class interface/methods. Test code should not be coupled with the implementation details. Not an easy task...
  10. First, keep test code minimal and keep test code simple.
  11. When injecting dependencies to a class, you can choose what to inject.
  12. This is the hard part... Stop verifying everything you can!
  13. I've used EasyMock for years...here is why I switched. Do I care to verify all interactions? Maybe I just care about the result. Do I care if the configuration is accessed 1 or 5 times? Do I want to check all interaction in all tests?
  14. Default behavior. Change if needed for a single test. Assert what is tested.
  15. Side note... Pattern that both create simple code and easily testable code. Stateless classes.