Skip to content
Christian Schwarz edited this page Aug 9, 2016 · 2 revisions

Code Duplicates

org.mockito.internal.configuration.SpyAnnotationEngine.assertNoIncompatibleAnnotations(Class, Field, Class...) org.mockito.internal.configuration.injection.scanner.InjectMocksScanner.assertNoAnnotations(Field, Class...)

Simplification

Mockito IDE PlugIn

Should find common errors while coding.

create an error marker at line when...

  • a class annotated with @Mock is final
  • a when clausle contains only the mock but no method call -> when(mock).then(..) instead of when(mock.call()).then(..)