------------------------------------------------------------------------------- Test set: com.etotem.cfc.controller.ArticleControllerTest ------------------------------------------------------------------------------- Tests run: 11, Failures: 4, Errors: 5, Skipped: 0, Time elapsed: 42.933 s <<< FAILURE! - in com.etotem.cfc.controller.ArticleControllerTest list_ByCategory Time elapsed: 0.066 s <<< ERROR! java.lang.NullPointerException at com.etotem.cfc.controller.ArticleControllerTest.list_ByCategory(ArticleControllerTest.java:90) recordRead_NoDuration Time elapsed: 0.049 s <<< ERROR! org.mockito.exceptions.base.MockitoException: Only void methods can doNothing()! Example of correct use of doNothing(): doNothing(). doThrow(new RuntimeException()) .when(mock).someVoidMethod(); Above means: someVoidMethod() does nothing the 1st time but throws an exception the 2nd time is called at com.etotem.cfc.controller.ArticleControllerTest.recordRead_NoDuration(ArticleControllerTest.java:226) featured_Success Time elapsed: 0.024 s <<< FAILURE! org.opentest4j.AssertionFailedError: expected: <2> but was: <0> at com.etotem.cfc.controller.ArticleControllerTest.featured_Success(ArticleControllerTest.java:177) list_LoggedInUser Time elapsed: 0.02 s <<< FAILURE! org.opentest4j.AssertionFailedError: expected: not at com.etotem.cfc.controller.ArticleControllerTest.list_LoggedInUser(ArticleControllerTest.java:132) list_Success Time elapsed: 0.016 s <<< FAILURE! org.opentest4j.AssertionFailedError: expected: not at com.etotem.cfc.controller.ArticleControllerTest.list_Success(ArticleControllerTest.java:70) recordRead_WithMemberId Time elapsed: 0.023 s <<< ERROR! org.mockito.exceptions.base.MockitoException: Only void methods can doNothing()! Example of correct use of doNothing(): doNothing(). doThrow(new RuntimeException()) .when(mock).someVoidMethod(); Above means: someVoidMethod() does nothing the 1st time but throws an exception the 2nd time is called at com.etotem.cfc.controller.ArticleControllerTest.recordRead_WithMemberId(ArticleControllerTest.java:215) featured_DefaultSize Time elapsed: 0.018 s <<< FAILURE! org.opentest4j.AssertionFailedError: expected: <1> but was: <0> at com.etotem.cfc.controller.ArticleControllerTest.featured_DefaultSize(ArticleControllerTest.java:190) list_ByKeyword Time elapsed: 0.019 s <<< ERROR! java.lang.NullPointerException at com.etotem.cfc.controller.ArticleControllerTest.list_ByKeyword(ArticleControllerTest.java:109) recordRead_Success Time elapsed: 0.026 s <<< ERROR! org.mockito.exceptions.base.MockitoException: Only void methods can doNothing()! Example of correct use of doNothing(): doNothing(). doThrow(new RuntimeException()) .when(mock).someVoidMethod(); Above means: someVoidMethod() does nothing the 1st time but throws an exception the 2nd time is called at com.etotem.cfc.controller.ArticleControllerTest.recordRead_Success(ArticleControllerTest.java:201)