import org.springframework.http.HttpStatus;
@ExtendWith(MockitoExtension.class)
-public class DmaapMessageConsumerTest {
+class DmaapMessageConsumerTest {
@Mock
private ApplicationConfig applicationConfigMock;
@Mock
private DmaapMessageConsumer messageConsumerUnderTest;
@AfterEach
- public void resetLogging() {
+ void resetLogging() {
LoggingUtils.getLogListAppender(DmaapMessageConsumer.class);
}
@Test
- public void dmaapNotConfigured_thenSleepAndRetryUntilConfig() throws Exception {
+ void dmaapNotConfigured_thenSleepAndRetryUntilConfig() throws Exception {
messageConsumerUnderTest = spy(new DmaapMessageConsumer(applicationConfigMock));
doNothing().when(messageConsumerUnderTest).sleep(any(Duration.class));
}
@Test
- public void dmaapConfigurationRemoved_thenStopPollingDmaapSleepAndRetry() throws Exception {
+ void dmaapConfigurationRemoved_thenStopPollingDmaapSleepAndRetry() throws Exception {
messageConsumerUnderTest = spy(new DmaapMessageConsumer(applicationConfigMock));
doNothing().when(messageConsumerUnderTest).sleep(any(Duration.class));
}
@Test
- public void dmaapConfiguredAndNoMessages_thenPollOnce() throws Exception {
+ void dmaapConfiguredAndNoMessages_thenPollOnce() throws Exception {
setUpMrConfig();
messageConsumerUnderTest = spy(new DmaapMessageConsumer(applicationConfigMock));
}
@Test
- public void dmaapConfiguredAndErrorGettingMessages_thenLogWarningAndSleep() throws Exception {
+ void dmaapConfiguredAndErrorGettingMessages_thenLogWarningAndSleep() throws Exception {
setUpMrConfig();
messageConsumerUnderTest = spy(new DmaapMessageConsumer(applicationConfigMock));
}
@Test
- public void dmaapConfiguredAndOneMessage_thenPollOnceAndProcessMessage() throws Exception {
+ void dmaapConfiguredAndOneMessage_thenPollOnceAndProcessMessage() throws Exception {
setUpMrConfig();
messageConsumerUnderTest = spy(new DmaapMessageConsumer(applicationConfigMock));