------------------------------------------------------------------------------- Test set: com.tradecloud.bean.product.ProductCatalogueManagerUnitTest ------------------------------------------------------------------------------- Tests run: 8, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.147 s <<< FAILURE! -- in com.tradecloud.bean.product.ProductCatalogueManagerUnitTest com.tradecloud.bean.product.ProductCatalogueManagerUnitTest.testUpdateException -- Time elapsed: 0.110 s <<< ERROR! org.mockito.exceptions.misusing.InvalidUseOfMatchersException: Invalid use of argument matchers! 3 matchers expected, 2 recorded: -> at com.tradecloud.bean.product.ProductCatalogueManagerUnitTest.testUpdateException(ProductCatalogueManagerUnitTest.java:134) -> at com.tradecloud.bean.product.ProductCatalogueManagerUnitTest.testUpdateException(ProductCatalogueManagerUnitTest.java:134) This exception may occur if matchers are combined with raw values: //incorrect: someMethod(anyObject(), "raw String"); When using matchers, all arguments have to be provided by matchers. For example: //correct: someMethod(anyObject(), eq("String by matcher")); For more info see javadoc for Matchers class. at com.tradecloud.bean.product.ProductCatalogueManagerUnitTest.testUpdateException(ProductCatalogueManagerUnitTest.java:134) com.tradecloud.bean.product.ProductCatalogueManagerUnitTest.testUpdateException -- Time elapsed: 0.110 s <<< ERROR! org.mockito.exceptions.misusing.UnfinishedStubbingException: Unfinished stubbing detected here: -> at com.tradecloud.bean.product.ProductCatalogueManagerUnitTest.testUpdateException(ProductCatalogueManagerUnitTest.java:134) E.g. thenReturn() may be missing. Examples of correct stubbing: when(mock.isOk()).thenReturn(true); when(mock.isOk()).thenThrow(exception); doThrow(exception).when(mock).someVoidMethod(); Hints: 1. missing thenReturn() 2. you are trying to stub a final method, which is not supported 3. you are stubbing the behaviour of another mock inside before 'thenReturn' instruction is completed