Showing
1 changed file
with
4 additions
and
1 deletions
... | @@ -13,6 +13,8 @@ import org.mockito.ArgumentCaptor; | ... | @@ -13,6 +13,8 @@ import org.mockito.ArgumentCaptor; |
13 | import org.mockito.Captor; | 13 | import org.mockito.Captor; |
14 | import org.mockito.Mock; | 14 | import org.mockito.Mock; |
15 | import org.mockito.Mockito; | 15 | import org.mockito.Mockito; |
16 | +import org.slf4j.Logger; | ||
17 | +import org.slf4j.LoggerFactory; | ||
16 | 18 | ||
17 | import java.util.HashSet; | 19 | import java.util.HashSet; |
18 | import java.util.Set; | 20 | import java.util.Set; |
... | @@ -27,6 +29,7 @@ import static org.mockito.Mockito.*; | ... | @@ -27,6 +29,7 @@ import static org.mockito.Mockito.*; |
27 | @ExtendWith(MockitoExtension.class) | 29 | @ExtendWith(MockitoExtension.class) |
28 | @DisplayName("Service layer for all publisher-related data") | 30 | @DisplayName("Service layer for all publisher-related data") |
29 | public class PublisherServiceDefaultTest { | 31 | public class PublisherServiceDefaultTest { |
32 | + Logger logger = LoggerFactory.getLogger(getClass()); | ||
30 | 33 | ||
31 | PublisherServiceDefault publisherServiceDefault; | 34 | PublisherServiceDefault publisherServiceDefault; |
32 | PublisherVersion publisherVersion; | 35 | PublisherVersion publisherVersion; |
... | @@ -109,7 +112,7 @@ public class PublisherServiceDefaultTest { | ... | @@ -109,7 +112,7 @@ public class PublisherServiceDefaultTest { |
109 | try { | 112 | try { |
110 | Mockito.verify(publisherSearchRepository).save(indexedPublisherArgumentCaptor.capture()); | 113 | Mockito.verify(publisherSearchRepository).save(indexedPublisherArgumentCaptor.capture()); |
111 | } catch (IndexingException e) { | 114 | } catch (IndexingException e) { |
112 | - e.printStackTrace(); | 115 | + logger.error("IndexingException {}", e); |
113 | } | 116 | } |
114 | IndexedPublisher indexedPublisher = indexedPublisherArgumentCaptor.getValue(); | 117 | IndexedPublisher indexedPublisher = indexedPublisherArgumentCaptor.getValue(); |
115 | assertThat(indexedPublisher.getPublisherId()).isEqualTo(111); | 118 | assertThat(indexedPublisher.getPublisherId()).isEqualTo(111); | ... | ... |
-
Please register or login to post a comment