Skip to content

Commit

Permalink
Merge branch 'feature/27616-mappings-extraction' of github.com:hivemq…
Browse files Browse the repository at this point in the history
…/hivemq-edge into feature/27616-mappings-extraction
  • Loading branch information
codepitbull committed Nov 26, 2024
2 parents 47e9b5c + 86acaba commit 405357e
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void test_startWritingAdapterSucceeded_eventsFired() throws Exception {
any())).thenReturn(CompletableFuture.completedFuture(null));
when(eventService.createAdapterEvent(anyString(), anyString())).thenReturn(eventBuilder);

final ProtocolAdapterWrapper<TestWritingAdapter> adapterWrapper = new ProtocolAdapterWrapper<>(mock(),
final ProtocolAdapterWrapper adapterWrapper = new ProtocolAdapterWrapper(mock(),
new TestWritingAdapter(true),
mock(),
mock(),
Expand All @@ -147,7 +147,7 @@ void test_startWritingNotEnabled_notStarted() throws Exception {
when(protocolAdapterWritingService.writingEnabled()).thenReturn(false);
when(eventService.createAdapterEvent(anyString(), anyString())).thenReturn(eventBuilder);

final ProtocolAdapterWrapper<TestWritingAdapter> adapterWrapper = new ProtocolAdapterWrapper<>(mock(),
final ProtocolAdapterWrapper adapterWrapper = new ProtocolAdapterWrapper(mock(),
new TestWritingAdapter(true),
mock(),
mock(),
Expand Down Expand Up @@ -176,7 +176,7 @@ void test_startWriting_adapterFailedStart_resourcesCleanedUp() {
any())).thenReturn(CompletableFuture.completedFuture(null));
when(eventService.createAdapterEvent(anyString(), anyString())).thenReturn(eventBuilder);

final ProtocolAdapterWrapper<TestWritingAdapter> adapterWrapper = new ProtocolAdapterWrapper<>(mock(),
final ProtocolAdapterWrapper adapterWrapper = new ProtocolAdapterWrapper(mock(),
new TestWritingAdapter(false),
mock(),
mock(),
Expand All @@ -191,7 +191,7 @@ void test_startWriting_adapterFailedStart_resourcesCleanedUp() {

assertEquals(ProtocolAdapterState.RuntimeStatus.STOPPED, adapterWrapper.getRuntimeStatus());
verify(remoteService).fireUsageEvent(any());
verify(protocolAdapterWritingService).stopWriting(adapterWrapper.getAdapter());
verify(protocolAdapterWritingService).stopWriting((WritingProtocolAdapter<WritingContext>) adapterWrapper.getAdapter());
}

@Test
Expand All @@ -204,7 +204,7 @@ void test_startWriting_eventServiceFailedStart_resourcesCleanedUp() {
when(eventService.createAdapterEvent(anyString(),
anyString())).thenThrow(new RuntimeException("we failed start"));

final ProtocolAdapterWrapper<TestWritingAdapter> adapterWrapper = new ProtocolAdapterWrapper<>(mock(),
final ProtocolAdapterWrapper adapterWrapper = new ProtocolAdapterWrapper(mock(),
new TestWritingAdapter(false),
mock(),
mock(),
Expand All @@ -219,7 +219,7 @@ void test_startWriting_eventServiceFailedStart_resourcesCleanedUp() {

assertEquals(ProtocolAdapterState.RuntimeStatus.STOPPED, adapterWrapper.getRuntimeStatus());
verify(remoteService, never()).fireUsageEvent(any());
verify(protocolAdapterWritingService).stopWriting(adapterWrapper.getAdapter());
verify(protocolAdapterWritingService).stopWriting((WritingProtocolAdapter<WritingContext>) adapterWrapper.getAdapter());
}

@Test
Expand All @@ -231,7 +231,7 @@ void test_stopWritingAdapterSucceeded_eventsFired() throws Exception {
when(protocolAdapterWritingService.stopWriting(any())).thenReturn(CompletableFuture.completedFuture(null));
when(eventService.createAdapterEvent(anyString(), anyString())).thenReturn(eventBuilder);

final ProtocolAdapterWrapper<TestWritingAdapter> adapterWrapper = new ProtocolAdapterWrapper<>(mock(),
final ProtocolAdapterWrapper adapterWrapper = new ProtocolAdapterWrapper(mock(),
new TestWritingAdapter(true),
mock(),
mock(),
Expand All @@ -258,7 +258,7 @@ void test_stopWritingAdapterFailed_eventsFired() throws Exception {
when(protocolAdapterWritingService.stopWriting(any())).thenReturn(CompletableFuture.completedFuture(null));
when(eventService.createAdapterEvent(anyString(), anyString())).thenReturn(eventBuilder);

final ProtocolAdapterWrapper<TestWritingAdapter> adapterWrapper = new ProtocolAdapterWrapper<>(mock(),
final ProtocolAdapterWrapper adapterWrapper = new ProtocolAdapterWrapper(mock(),
new TestWritingAdapter(false),
mock(),
mock(),
Expand Down

0 comments on commit 405357e

Please sign in to comment.