Skip to content

Commit 0f87217

Browse files
BENCH-153 Addressed Andrews PR Comment: Was this a mistake with the rebase? Seems a bit sparse
1 parent c73f66c commit 0f87217

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/java/com/answerdigital/academy/answerking/service/CategoryServiceTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ void testRetireCategoryAlreadyRetiredThrowsRetirementException() {
323323

324324
@Test
325325
void testRetireCategoryDoesNotExistThrowsNotFoundException() {
326+
// when
327+
doReturn(Optional.empty()).when(categoryRepository).findById(anyLong());
328+
326329
// then
327330
assertThrows(NotFoundException.class, () -> categoryService.retireCategory(CATEGORY_ID));
328331
verify(categoryRepository).findById(anyLong());

0 commit comments

Comments
 (0)