SlideShare a Scribd company logo
1 of 43
Download to read offline
A Simple, Intuitive Mocking Framework
www.axon.vnfb.com/AxonActiveVietNam
• Refresh the importance of unit testing
• Mock framework
• Mock with Mockito API
• Configuring Mockito in a Project
• Creating Mock
• Stubbing Method‟s Returned Value
• Argument Matching
• And more...
• Conclusion and Q&A
Mocks with Mockito API
Agenda
2/41
www.axon.vnfb.com/AxonActiveVietNam
Refresh : the importance of Unit testing
3/41Mocks with Mockito API
www.axon.vnfb.com/AxonActiveVietNam
• Help to ensure that code meets requirements
• Could be considered a form of documentations as to how
the system currently operates.
• Help to ensure that changes made by the enhancement do
not break the existing system.
• Encourage refactoring.
• Integrate with Continuous Integration
• Improve design
Refresh : the importance of Unit testing
4/41Mocks with Mockito API
www.axon.vnfb.com/AxonActiveVietNam
• The „hello world‟ has no dependencies on outside classes.
• Software has dependencies.
• The dependencies have not implemented yet.
• The idea of UT : test our code without testing the
dependencies
Problem…
Action
classes
(Testing)
Service
classes
DAO
classes
Dependencies of Action classes
5/41Mocks with Mockito API
www.axon.vnfb.com/AxonActiveVietNam
• Didn’t write unit testing for my code 
• Dependencies have been implemented
• Invoke dependencies directly in unit test.
• It‟s not unit test anymore ( integration test instead )
• Dependencies have NOT been implemented yet.
• Wait for some guys implementing the dependencies first.
• Hard code return value of the dependencies.
How I ‘solve’ the problem before ?
6/41Mocks with Mockito API
www.axon.vnfb.com/AxonActiveVietNamMocks with Mockito API 7/41
www.axon.vnfb.com/AxonActiveVietNam
HOW
Mocks with Mockito API 8/41
www.axon.vnfb.com/AxonActiveVietNam
MOCK FRAMEWORK
Mocks with Mockito API
“ Do One Thing and Do It Well “
Dan North
9/41
www.axon.vnfb.com/AxonActiveVietNam
In one sentence
What mock is ?
Mocks with Mockito API
“Mocks are object that simulates the
behavior of real an object.”
“break dependencies of your classes”
10/41
www.axon.vnfb.com/AxonActiveVietNam
Why mock ?
Mocks with Mockito API
• Break dependencies.
• Parallel working.
• Do not need to modify code to “hard code” returning value of
dependencies.
• Run unit testing faster.
• Improve code design.
• Have fun in unit testing. 
11/41
www.axon.vnfb.com/AxonActiveVietNam
• The real object is
• Difficult to setup
• Has behavior that is hard to trigger
• Slow
• User interface
• Some cases
• Dependencies are sensitive resources in real code.
• Charge money on API calls / API limit.
• Database accessing / Network interaction.
When I can use mock?
Mocks with Mockito API 12/41
www.axon.vnfb.com/AxonActiveVietNam
Mock model
Mocks with Mockito API
Action
classes
(Testing)
Service
classes
DAO
classes
Action
classes
(Testing)
Mock
Service
classes
Mock
DAO
classes
Without mock
With mock
13/41
www.axon.vnfb.com/AxonActiveVietNamMocks with Mockito API 14/41
www.axon.vnfb.com/AxonActiveVietNam
Mocks API ( Java )
Mocks with Mockito API 15/41
www.axon.vnfb.com/AxonActiveVietNam
In my opinion is
What is the selected ?
• Easy to use
• Simple & clean syntax
• Excellent documentation
See more on SO
Why ?
Mocks with Mockito API
“Mockito really cleans up the unit test by not requiring expectations. Personally, I much
prefer the Mockito API to the EasyMock API for that reason.” - Hamlet D'Arcy
16/41
www.axon.vnfb.com/AxonActiveVietNam
Install Mockito
Maven
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.17</version>
</dependency>
Gradle
'org.mockito:mockito-all:1.10.17'
In your code, import
import static org.mockito.Mockito.*;
Mocks with Mockito API 17/41
www.axon.vnfb.com/AxonActiveVietNam
• The given : describes the state of the world before you begin
the behavior. You can think of it as the pre-conditions to the
test.
• The when : is that behavior that you're specifying.
• The then : describes the changes you expect due to the
specified behavior.
Given-When-Then is a style of representing tests, part of BDD
Given-When-Then
18/41Mocks with Mockito API
www.axon.vnfb.com/AxonActiveVietNam
• A stub may simulate the behavior of existing code (Wikipedia)
• What's the difference between faking, mocking, and stubbing?
(view on SO)
Method stub
Mocks with Mockito API 19/41
www.axon.vnfb.com/AxonActiveVietNam
• mock(ClassToMock.class)
• when(methodCall)
• thenReturn(value)
• doReturn(value)
• thenThrow(Throwable)
• verify(mock).method(args)
• initMocks(this), @Mock, @Spy
Mockito - keywords
Mocks with Mockito API 20/41
www.axon.vnfb.com/AxonActiveVietNam
Without mock
@Test
public void test() throws Exception {
// Given
TestingObject testingObj = new TestingObject();
DependencyObject dependencyObj =
new DependencyObject();
// When
testingObject.doSomeThing(helper);
// Then
assertTrue(helper.somethingHappened());
}
Mocks with Mockito API 21/41
www.axon.vnfb.com/AxonActiveVietNam
Mockito "Template" Usage
@Test
public void test() throws Exception {
// Given (prepare behavior)
TestingObject testingObj = new TestingObject();
DependencyObject mockObj =
mock(DependencyObject.class);
when(mockObj.domesomething()).thenReturn(“A”);
// When
testingObject.doSomeThing(helper);
// Then (verify)
assertTrue(helper.somethingHappened());
}
Mocks with Mockito API 22/41
www.axon.vnfb.com/AxonActiveVietNam
• You can use Mockito to create mocks of a regular (not final)
class not only of an interface.
• Methods (include their arguments) that was not stubbed,
then return null when invoked. (See here)
Tips
Mocks with Mockito API 23/41
www.axon.vnfb.com/AxonActiveVietNam
That’s quite enough !
Let’s drink
Mocks with Mockito API 24/41
www.axon.vnfb.com/AxonActiveVietNam
Argument matchers
when(mockObject.dosomeThing(anyInt()).thenReturn(true);
• Mockito offer some built-in such as: anyString(), anyInt(),
any(Class<T> clazz), isNull, …
• Custom argument matchers (extends ArgumentMatcher)
If you are using argument matchers, all arguments have to
be provided by matchers.
Mocks with Mockito API 25/41
www.axon.vnfb.com/AxonActiveVietNam
In some situations, it is helpful to assert on certain arguments
after the actual verification
ArgumentCaptor
Mocks with Mockito API
ArgumentCaptor<Person> argument =
ArgumentCaptor.forClass(Person.class);
verify(mockObj).doSomething(argument.capture());
assertEquals("John", argument.getValue().getName());
In more details…
26/41
www.axon.vnfb.com/AxonActiveVietNam
Stubbing multiple calls to the same method
@Test
public void shouldReturnLastDefinedValueConsistently() {
WaterSource waterSource = mock(WaterSource.class);
when(waterSource.getWaterPressure()).thenReturn(3, 5);
assertEquals(waterSource.getWaterPressure(), 3);
assertEquals(waterSource.getWaterPressure(), 5);
assertEquals(waterSource.getWaterPressure(), 5);
}
Mocks with Mockito API
Return different values for subsequent calls of the same method.
27/41
www.axon.vnfb.com/AxonActiveVietNam
• The stubbed method is passed as a parameter to a given /
when method.
• So, cannot use this construct for void methods.
• Instead, you should use willXXX..given or doXXX..when
Stubbing void methods
@Test(expectedExceptions = RuntimeException.class)
public void shouldStubVoidMethod() {
doThrow(new RuntimeException()).when(mockedList).clear();
//following throws RuntimeException:
mockedList.clear();
}
Mocks with Mockito API 28/41
www.axon.vnfb.com/AxonActiveVietNam
• Some cases, impossible to test with pure mocks
• Legacy code.
• IoC containers
• "partial mocking" concept
• Instead of mocking, calling directly to real object.
• Usually, there is no reason to spy on real objects
• Code smell
Spying on real objects
Mocks with Mockito API 29/41
www.axon.vnfb.com/AxonActiveVietNam
Example of spying on real objects
List spy = spy(new LinkedList());
when(spy.size()).thenReturn(100); // size() is stubbed.
spy.add("one"); // Assume that this’s legacy code.
assertEquals("one", spy.get(0)); // *real* method
assertEquals(100, spy.size()); // *stubbed* method
//optionally, you can verify
verify(spy).add("one");
Mocks with Mockito API 30/41
www.axon.vnfb.com/AxonActiveVietNam
• Sometimes it's impossible to use when..thenReturn for stubbing
spies.
• Consider doReturn..when
Important gotcha
List spy = spy(new LinkedList());
// the list is yet empty -> IndexOutOfBoundsException
when(spy.get(0)).thenReturn("foo");
//You have to use doReturn() for stubbing
doReturn("foo").when(spy).get(0);
Mocks with Mockito API 31/41
www.axon.vnfb.com/AxonActiveVietNam
• @Mock, @Spy : simplify the process of creating relevant
objects using static methods.
• @InjectMocks : simplifies mock and spy injection
• MockitoJUnit4Runner as a JUnit runner
• Or, MockitoAnnotations.initMocks( testClass )
• Helpful in Spring DI
Annotations
Mocks with Mockito API 32/41
www.axon.vnfb.com/AxonActiveVietNam
public class OrderService {
PriceService priceService;
OrderDao orderDao;
}
@RunWith(MockitoJUnitRunner.class)
public class MockInjectingTest {
@Mock
PriceService mockPriceService;
@Spy
OrderDao spyOrderDao;
@InjectMocks
OrderService testOrderService;
}
Annotations
Mocks with Mockito API 33/41
www.axon.vnfb.com/AxonActiveVietNam
• Verifying exact number of invocations / at least x / never
Some common verifying actions
LinkedList mockedList = mock(LinkedList.class);
mockedList.add("once");
mockedList.add("twice");
mockedList.add("twice");
verify(mockedList, times(1)).add("once");
//exact number of invocations verification
verify(mockedList, times(2)).add("twice");
verify(mockedList, never()).add("never happened");
verify(mockedList, atLeastOnce()).add("twice");
Mocks with Mockito API 34/41
www.axon.vnfb.com/AxonActiveVietNam
Case : how to test ‘cache’ instance ?
@Cacheable
CurrencyRequester
- getExchangeCurrencyRates()
{
HttpRequester
}
CurrencyRequesterTest
Mocks with Mockito API 35/41
www.axon.vnfb.com/AxonActiveVietNam
HttpRequester mockRequester = mock(HttpRequester.class)
when(httpRequester.makeHttpGetRequest(anyString())).
thenReturn(result);
currencyRequester.getExchangeCurrencyRates();
currencyRequester.getExchangeCurrencyRates();
verify(httpRequester,times(0)).makeHttpGetRequest(anyString());
Mocks with Mockito API
Case : how to test ‘cache’ instance ?
36/41
www.axon.vnfb.com/AxonActiveVietNam
• mock final classes
• mock enums
• mock final methods
• mock static methods
• mock private methods
• mock hashCode() and equals()
Mockito can not :
Limitations
PowerMock or JMockit can be used
to work with code that cannot be
mocked with pure Mockito
Mocks with Mockito API 37/41
www.axon.vnfb.com/AxonActiveVietNam
Conclusion
Mockito
Unit testing
Mock framework
mock
when..thenReturn
Dependencies
spy
‘partial mocking’
Limitations
verify
Argument
matchers
AnnotationsthenThrow
Method stub
1.10.17
Mocks with Mockito API
Write code testableClean & clear
38/41
www.axon.vnfb.com/AxonActiveVietNam
Unit testing is testing units.
Units bare without dependencies.
And this can be done with mocks
Saying it simply
39/41Mocks with Mockito API
www.axon.vnfb.com/AxonActiveVietNam
• https://code.google.com/p/mockito/
• http://refcardz.dzone.com/refcardz/mockito
• http://www.slideshare.net/fwendt/using-mockito
References
Mocks with Mockito API 40/41
www.axon.vnfb.com/AxonActiveVietNam
• Try to google “mock test framwork”, “mockito”…
• Visit mockito home page
• Write yourself some code with dependencies, then try to test them
with mock framework.
• Try to find another mock API with your programming language.
• Check out : https://bitbucket.org/phatvu/mockito-learning
• Sample example about Mockito with Java.
• Sample example about Mockito with Spring.
What will you do ?
41/41Mocks with Mockito API
www.axon.vnfb.com/AxonActiveVietNamMocks with Mockito API
www.axon.vnfb.com/AxonActiveVietNamMocks with Mockito API
http://goo.gl/ePWvmA

More Related Content

What's hot

Py.test
Py.testPy.test
Py.testsoasme
 
Painless JavaScript Testing with Jest
Painless JavaScript Testing with JestPainless JavaScript Testing with Jest
Painless JavaScript Testing with JestMichał Pierzchała
 
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and MockitoAn Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockitoshaunthomas999
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And MockingJoe Wilson
 
Mobile Application Penetration Testing Giordano Giammaria
Mobile Application Penetration Testing Giordano GiammariaMobile Application Penetration Testing Giordano Giammaria
Mobile Application Penetration Testing Giordano GiammariaGiammaria Giordano
 
Testes pythonicos com pytest
Testes pythonicos com pytestTestes pythonicos com pytest
Testes pythonicos com pytestviniciusban
 
Testing Spring Boot Applications
Testing Spring Boot ApplicationsTesting Spring Boot Applications
Testing Spring Boot ApplicationsVMware Tanzu
 
Unit Testing in Python
Unit Testing in PythonUnit Testing in Python
Unit Testing in PythonHaim Michael
 
JUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkJUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkOnkar Deshpande
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
Robot framework 을 이용한 기능 테스트 자동화
Robot framework 을 이용한 기능 테스트 자동화Robot framework 을 이용한 기능 테스트 자동화
Robot framework 을 이용한 기능 테스트 자동화Jaehoon Oh
 
T119_5年間の試行錯誤で進化したMVPVMパターン
T119_5年間の試行錯誤で進化したMVPVMパターンT119_5年間の試行錯誤で進化したMVPVMパターン
T119_5年間の試行錯誤で進化したMVPVMパターン伸男 伊藤
 
Formation Gratuite Total Tests par les experts Java Ippon
Formation Gratuite Total Tests par les experts Java Ippon Formation Gratuite Total Tests par les experts Java Ippon
Formation Gratuite Total Tests par les experts Java Ippon Ippon
 

What's hot (20)

Py.test
Py.testPy.test
Py.test
 
Java Unit Testing
Java Unit TestingJava Unit Testing
Java Unit Testing
 
Unit Testing in Java
Unit Testing in JavaUnit Testing in Java
Unit Testing in Java
 
Mockito
MockitoMockito
Mockito
 
JUNit Presentation
JUNit PresentationJUNit Presentation
JUNit Presentation
 
JUnit 5
JUnit 5JUnit 5
JUnit 5
 
Painless JavaScript Testing with Jest
Painless JavaScript Testing with JestPainless JavaScript Testing with Jest
Painless JavaScript Testing with Jest
 
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and MockitoAn Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
An Introduction to JUnit 5 and how to use it with Spring boot tests and Mockito
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Mobile Application Penetration Testing Giordano Giammaria
Mobile Application Penetration Testing Giordano GiammariaMobile Application Penetration Testing Giordano Giammaria
Mobile Application Penetration Testing Giordano Giammaria
 
Testes pythonicos com pytest
Testes pythonicos com pytestTestes pythonicos com pytest
Testes pythonicos com pytest
 
Junit
JunitJunit
Junit
 
Testing Spring Boot Applications
Testing Spring Boot ApplicationsTesting Spring Boot Applications
Testing Spring Boot Applications
 
Unit Testing in Python
Unit Testing in PythonUnit Testing in Python
Unit Testing in Python
 
JUnit- A Unit Testing Framework
JUnit- A Unit Testing FrameworkJUnit- A Unit Testing Framework
JUnit- A Unit Testing Framework
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
 
Robot framework 을 이용한 기능 테스트 자동화
Robot framework 을 이용한 기능 테스트 자동화Robot framework 을 이용한 기능 테스트 자동화
Robot framework 을 이용한 기능 테스트 자동화
 
T119_5年間の試行錯誤で進化したMVPVMパターン
T119_5年間の試行錯誤で進化したMVPVMパターンT119_5年間の試行錯誤で進化したMVPVMパターン
T119_5年間の試行錯誤で進化したMVPVMパターン
 
Formation Gratuite Total Tests par les experts Java Ippon
Formation Gratuite Total Tests par les experts Java Ippon Formation Gratuite Total Tests par les experts Java Ippon
Formation Gratuite Total Tests par les experts Java Ippon
 

Viewers also liked

Mockito with a hint of PowerMock
Mockito with a hint of PowerMockMockito with a hint of PowerMock
Mockito with a hint of PowerMockYing Zhang
 
Programmer testing
Programmer testingProgrammer testing
Programmer testingJoao Pereira
 
Basic Unit Testing with Mockito
Basic Unit Testing with MockitoBasic Unit Testing with Mockito
Basic Unit Testing with MockitoAlexander De Leon
 
Software Engineering - RS3
Software Engineering - RS3Software Engineering - RS3
Software Engineering - RS3AtakanAral
 
Advanced junit and mockito
Advanced junit and mockitoAdvanced junit and mockito
Advanced junit and mockitoMathieu Carbou
 
Clean Unit Test Patterns
Clean Unit Test PatternsClean Unit Test Patterns
Clean Unit Test PatternsFrank Appel
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testingikhwanhayat
 
Unit testing best practices
Unit testing best practicesUnit testing best practices
Unit testing best practicesnickokiss
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration TestingDavid Berliner
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesDerek Smith
 
UNIT TESTING PPT
UNIT TESTING PPTUNIT TESTING PPT
UNIT TESTING PPTsuhasreddy1
 

Viewers also liked (13)

Mockito with a hint of PowerMock
Mockito with a hint of PowerMockMockito with a hint of PowerMock
Mockito with a hint of PowerMock
 
Programmer testing
Programmer testingProgrammer testing
Programmer testing
 
Basic Unit Testing with Mockito
Basic Unit Testing with MockitoBasic Unit Testing with Mockito
Basic Unit Testing with Mockito
 
Demystifying git
Demystifying git Demystifying git
Demystifying git
 
Software Engineering - RS3
Software Engineering - RS3Software Engineering - RS3
Software Engineering - RS3
 
Advanced junit and mockito
Advanced junit and mockitoAdvanced junit and mockito
Advanced junit and mockito
 
Clean Unit Test Patterns
Clean Unit Test PatternsClean Unit Test Patterns
Clean Unit Test Patterns
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
 
Unit testing best practices
Unit testing best practicesUnit testing best practices
Unit testing best practices
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration Testing
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
 
UNIT TESTING PPT
UNIT TESTING PPTUNIT TESTING PPT
UNIT TESTING PPT
 
How to Use Slideshare
How to Use SlideshareHow to Use Slideshare
How to Use Slideshare
 

Similar to Mockito a simple, intuitive mocking framework

CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!Ortus Solutions, Corp
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsandyinthecloud
 
Just Mock It - Mocks and Stubs
Just Mock It - Mocks and StubsJust Mock It - Mocks and Stubs
Just Mock It - Mocks and StubsGavin Pickin
 
Devday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvuDevday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvuPhat VU
 
Real World Asp.Net WebApi Applications
Real World Asp.Net WebApi ApplicationsReal World Asp.Net WebApi Applications
Real World Asp.Net WebApi ApplicationsEffie Arditi
 
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...DevDay.org
 
How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)Felix Geisendörfer
 
Hacking Java - Enhancing Java Code at Build or Runtime
Hacking Java - Enhancing Java Code at Build or RuntimeHacking Java - Enhancing Java Code at Build or Runtime
Hacking Java - Enhancing Java Code at Build or RuntimeSean P. Floyd
 
Dependency Injection in .NET applications
Dependency Injection in .NET applicationsDependency Injection in .NET applications
Dependency Injection in .NET applicationsBabak Naffas
 
Arquillian Constellation
Arquillian ConstellationArquillian Constellation
Arquillian ConstellationAlex Soto
 
Mobile Developers Talks: Delve Mobile
Mobile Developers Talks: Delve MobileMobile Developers Talks: Delve Mobile
Mobile Developers Talks: Delve MobileKonstantin Loginov
 
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon RitterJava Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon RitterJAX London
 
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIOScrum Breakfast Vietnam
 
Rapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorRapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorTrayan Iliev
 

Similar to Mockito a simple, intuitive mocking framework (20)

CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!
 
Mock your way with Mockito
Mock your way with MockitoMock your way with Mockito
Mock your way with Mockito
 
Mock with Mockito
Mock with MockitoMock with Mockito
Mock with Mockito
 
Building strong foundations apex enterprise patterns
Building strong foundations apex enterprise patternsBuilding strong foundations apex enterprise patterns
Building strong foundations apex enterprise patterns
 
Easy mock
Easy mockEasy mock
Easy mock
 
Just Mock It - Mocks and Stubs
Just Mock It - Mocks and StubsJust Mock It - Mocks and Stubs
Just Mock It - Mocks and Stubs
 
Building XWiki
Building XWikiBuilding XWiki
Building XWiki
 
Devday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvuDevday2016 real unittestingwithmockframework-phatvu
Devday2016 real unittestingwithmockframework-phatvu
 
Robolectric Adventure
Robolectric AdventureRobolectric Adventure
Robolectric Adventure
 
Real World Asp.Net WebApi Applications
Real World Asp.Net WebApi ApplicationsReal World Asp.Net WebApi Applications
Real World Asp.Net WebApi Applications
 
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...
[DevDay 2016] Real Unit Testing with mocking framework - Speaker: Phat Vu – S...
 
Human programming
Human programmingHuman programming
Human programming
 
How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)
 
Hacking Java - Enhancing Java Code at Build or Runtime
Hacking Java - Enhancing Java Code at Build or RuntimeHacking Java - Enhancing Java Code at Build or Runtime
Hacking Java - Enhancing Java Code at Build or Runtime
 
Dependency Injection in .NET applications
Dependency Injection in .NET applicationsDependency Injection in .NET applications
Dependency Injection in .NET applications
 
Arquillian Constellation
Arquillian ConstellationArquillian Constellation
Arquillian Constellation
 
Mobile Developers Talks: Delve Mobile
Mobile Developers Talks: Delve MobileMobile Developers Talks: Delve Mobile
Mobile Developers Talks: Delve Mobile
 
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon RitterJava Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
Java Core | JavaFX 2.0: Great User Interfaces in Java | Simon Ritter
 
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
 
Rapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorRapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and Ktor
 

Recently uploaded

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 

Recently uploaded (20)

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 

Mockito a simple, intuitive mocking framework