From d8454f450aea8d0e809d86a0238c0a07eb8e841a Mon Sep 17 00:00:00 2001 From: Rwolfe-Nava Date: Tue, 11 Jun 2024 10:05:51 -0400 Subject: [PATCH] add mock for createStatement --- .../src/test/java/gov/cms/ab2d/optout/OptOutProcessorTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/optout/src/test/java/gov/cms/ab2d/optout/OptOutProcessorTest.java b/optout/src/test/java/gov/cms/ab2d/optout/OptOutProcessorTest.java index 1d09930..cf13d0a 100644 --- a/optout/src/test/java/gov/cms/ab2d/optout/OptOutProcessorTest.java +++ b/optout/src/test/java/gov/cms/ab2d/optout/OptOutProcessorTest.java @@ -49,6 +49,7 @@ static void beforeAll() throws SQLException { mockStatic(DriverManager.class) .when(() -> DriverManager.getConnection(anyString(), anyString(), anyString())).thenReturn(dbConnection); when(dbConnection.prepareStatement(anyString())).thenReturn(preparedStatement); + when(dbConnection.createStatement()).thenReturn(preparedStatement); when(preparedStatement.executeQuery(anyString())).thenReturn(resultSet); when(resultSet.next()).thenReturn(true).thenReturn(false); when(resultSet.getInt(any())).thenReturn(TEST_TOTAL_RESULT_COUNT);