Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
smirnovaae committed Mar 20, 2024
1 parent 9029920 commit 3135dde
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package gov.cms.ab2d.optout;

import com.amazonaws.services.lambda.runtime.LambdaLogger;
import com.amazonaws.services.lambda.runtime.events.SQSEvent;
import com.amazonaws.services.s3.event.S3EventNotification;
import gov.cms.ab2d.testutils.AB2DPostgresqlContainer;
Expand All @@ -14,14 +13,12 @@
import org.testcontainers.junit.jupiter.Testcontainers;

import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Collections;

import static gov.cms.ab2d.optout.OptOutConstantsTest.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;

@Testcontainers
Expand All @@ -31,15 +28,15 @@ public class OptOutHandlerTest {
@Container
private static final PostgreSQLContainer POSTGRE_SQL_CONTAINER = new AB2DPostgresqlContainer();
private final static OptOutHandler handler = spy(new OptOutHandler());
private final static OptOutProcessor OPT_OUT_PROCESSOR = mock(OptOutProcessor.class);
// private final static OptOutProcessor OPT_OUT_PROCESSOR = mock(OptOutProcessor.class);
private final static SQSEvent sqsEvent = mock(SQSEvent.class);
private final static SQSEvent.SQSMessage sqsMessage = mock(SQSEvent.SQSMessage.class);

@BeforeAll
static void beforeAll() throws URISyntaxException, IOException {
static void beforeAll() throws IOException {
when(sqsEvent.getRecords()).thenReturn(Collections.singletonList(sqsMessage));
when(sqsMessage.getBody()).thenReturn(getPayload());
when(handler.processorInit(any(LambdaLogger.class))).thenReturn(OPT_OUT_PROCESSOR);
// when(handler.processorInit(any(LambdaLogger.class))).thenReturn(OPT_OUT_PROCESSOR);
}

@Test
Expand Down

0 comments on commit 3135dde

Please sign in to comment.