Mockito nulls
When you want to match a null in your mocks ...
classUnderTest = mock(ClassUnderTest.class);
when(classUnderTest.methodUnderTest(isNull(MyClass.class)).thenReturn(false);
Written by Scott Bennett-McLeish
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Java
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#