@@ -70,8 +70,7 @@ public void testDropKey() throws Exception {
7070 verify (connectionMock , times (1 )).prepareStatement (anyString ());
7171 verify (preparedStatementMock , times (1 )).executeUpdate ();
7272 verify (preparedStatementMock , times (1 )).close ();
73- verify (loggerMock , times (1 )).debug (anyString ());
74- verify (loggerMock , times (0 )).warn (anyString (), any (Throwable .class ));
73+ verify (loggerMock , times (1 )).debug (contains ("successfully" ));
7574 }
7675
7776 @ Test (expected = NullPointerException .class )
@@ -100,8 +99,7 @@ public void testDropKeyWhenTableNameIsNull() throws Exception {
10099 verify (connectionMock , times (1 )).prepareStatement (anyString ());
101100 verify (preparedStatementMock , times (1 )).executeUpdate ();
102101 verify (preparedStatementMock , times (1 )).close ();
103- verify (loggerMock , times (0 )).debug (anyString ());
104- verify (loggerMock , times (1 )).warn (anyString (), eq (sqlException ));
102+ verify (loggerMock , times (1 )).debug (contains ("Exception" ));
105103 }
106104
107105 @ Test
@@ -120,8 +118,7 @@ public void testDropKeyWhenKeyIsNull() throws Exception {
120118 verify (connectionMock , times (1 )).prepareStatement (anyString ());
121119 verify (preparedStatementMock , times (1 )).executeUpdate ();
122120 verify (preparedStatementMock , times (1 )).close ();
123- verify (loggerMock , times (0 )).debug (anyString ());
124- verify (loggerMock , times (1 )).warn (anyString (), eq (sqlException ));
121+ verify (loggerMock , times (1 )).debug (contains ("Exception" ));
125122 }
126123
127124 @ Test
@@ -138,8 +135,7 @@ public void testDropKeyWhenKeysAreForeignKeys() throws Exception {
138135 verify (connectionMock , times (1 )).prepareStatement (anyString ());
139136 verify (preparedStatementMock , times (1 )).executeUpdate ();
140137 verify (preparedStatementMock , times (1 )).close ();
141- verify (loggerMock , times (1 )).debug (anyString ());
142- verify (loggerMock , times (0 )).warn (anyString (), any (Throwable .class ));
138+ verify (loggerMock , times (1 )).debug (contains ("successfully" ));
143139 }
144140
145141 @ Test
@@ -157,8 +153,7 @@ public void testDropKeyWhenPrepareStatementResultsInException() throws Exception
157153 verify (connectionMock , times (1 )).prepareStatement (anyString ());
158154 verify (preparedStatementMock , times (0 )).executeUpdate ();
159155 verify (preparedStatementMock , times (0 )).close ();
160- verify (loggerMock , times (0 )).debug (anyString ());
161- verify (loggerMock , times (1 )).warn (anyString (), eq (sqlException ));
156+ verify (loggerMock , times (1 )).debug (contains ("Exception" ));
162157 }
163158
164159 @ Test
@@ -177,8 +172,7 @@ public void testDropKeyWhenExecuteUpdateResultsInException() throws Exception {
177172 verify (connectionMock , times (1 )).prepareStatement (anyString ());
178173 verify (preparedStatementMock , times (1 )).executeUpdate ();
179174 verify (preparedStatementMock , times (1 )).close ();
180- verify (loggerMock , times (0 )).debug (anyString ());
181- verify (loggerMock , times (1 )).warn (anyString (), eq (sqlException ));
175+ verify (loggerMock , times (1 )).debug (contains ("Exception" ));
182176 }
183177
184178 @ SuppressWarnings ("static-access" )
@@ -231,8 +225,7 @@ public void testDropPrimaryKey() throws Exception {
231225 verify (connectionMock , times (1 )).prepareStatement (anyString ());
232226 verify (preparedStatementMock , times (1 )).executeUpdate ();
233227 verify (preparedStatementMock , times (1 )).close ();
234- verify (loggerMock , times (1 )).debug (anyString ());
235- verify (loggerMock , times (0 )).warn (anyString (), any (Throwable .class ));
228+ verify (loggerMock , times (1 )).debug (contains ("successfully" ));
236229 }
237230
238231 @ Test (expected = NullPointerException .class )
@@ -257,8 +250,7 @@ public void testDropPrimaryKeyWhenTableNameIsNull() throws Exception {
257250 verify (connectionMock , times (1 )).prepareStatement (anyString ());
258251 verify (preparedStatementMock , times (1 )).executeUpdate ();
259252 verify (preparedStatementMock , times (1 )).close ();
260- verify (loggerMock , times (0 )).debug (anyString ());
261- verify (loggerMock , times (1 )).warn (anyString (), eq (sqlException ));
253+ verify (loggerMock , times (1 )).debug (contains ("Exception" ));
262254 }
263255
264256 @ Test
@@ -274,8 +266,7 @@ public void testDropPrimaryKeyWhenPrepareStatementResultsInException() throws Ex
274266 verify (connectionMock , times (1 )).prepareStatement (anyString ());
275267 verify (preparedStatementMock , times (0 )).executeUpdate ();
276268 verify (preparedStatementMock , times (0 )).close ();
277- verify (loggerMock , times (0 )).debug (anyString ());
278- verify (loggerMock , times (1 )).warn (anyString (), eq (sqlException ));
269+ verify (loggerMock , times (1 )).debug (contains ("Exception" ));
279270 }
280271
281272 @ Test
@@ -292,8 +283,7 @@ public void testDropPrimaryKeyWhenExecuteUpdateResultsInException() throws Excep
292283 verify (connectionMock , times (1 )).prepareStatement (anyString ());
293284 verify (preparedStatementMock , times (1 )).executeUpdate ();
294285 verify (preparedStatementMock , times (1 )).close ();
295- verify (loggerMock , times (0 )).debug (anyString ());
296- verify (loggerMock , times (1 )).warn (anyString (), eq (sqlException ));
286+ verify (loggerMock , times (1 )).debug (contains ("Exception" ));
297287 }
298288
299289 @ Test
@@ -309,7 +299,7 @@ public void testColumnExists() throws Exception {
309299 verify (connectionMock , times (1 )).prepareStatement (anyString ());
310300 verify (preparedStatementMock , times (1 )).executeQuery ();
311301 verify (preparedStatementMock , times (1 )).close ();
312- verify (loggerMock , times (0 )).warn (anyString (), any (Throwable .class ));
302+ verify (loggerMock , times (0 )).debug (anyString (), any (Throwable .class ));
313303 }
314304
315305 @ Test (expected = NullPointerException .class )
@@ -336,7 +326,7 @@ public void testColumnExistsWhenTableNameIsNull() throws Exception {
336326 verify (connectionMock , times (1 )).prepareStatement (anyString ());
337327 verify (preparedStatementMock , times (1 )).executeQuery ();
338328 verify (preparedStatementMock , times (1 )).close ();
339- verify (loggerMock , times (1 )).warn (anyString (), eq ( sqlException ));
329+ verify (loggerMock , times (1 )).debug (anyString ());
340330 }
341331
342332 @ Test
@@ -354,7 +344,7 @@ public void testColumnExistsWhenColumnNameIsNull() throws Exception {
354344 verify (connectionMock , times (1 )).prepareStatement (anyString ());
355345 verify (preparedStatementMock , times (1 )).executeQuery ();
356346 verify (preparedStatementMock , times (1 )).close ();
357- verify (loggerMock , times (1 )).warn (anyString (), eq ( sqlException ));
347+ verify (loggerMock , times (1 )).debug (anyString ());
358348 }
359349
360350 @ Test
0 commit comments